method

create_record

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

create_record(attributes, &block)
private

No documentation available.

# File activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb, line 124
        def create_record(attributes, &block)
          # Can't use Base.create because the foreign key may be a protected attribute.
          ensure_owner_is_not_new
          if attributes.is_a?(Array)
            attributes.collect { |attr| create(attr) }
          else
            build_record(attributes, &block)
          end
        end