method
create_record
v2.3.8 -
Show latest stable
-
0 notes -
Class: ActiveRecord::Associations::HasAndBelongsToManyAssociation
create_record(attributes, &block)
private
Hide source
# File activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb, line 132 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