Class: ScopedAssociations::ActiveRecord5::HasManyClassMethods::ScopedHasManyAssociation

Inherits:
ActiveRecord::Associations::HasManyAssociation
  • Object
show all
Defined in:
lib/scoped_associations/activerecord5/has_many.rb

Instance Method Summary collapse

Instance Method Details

#creation_attributesObject



21
22
23
24
25
# File 'lib/scoped_associations/activerecord5/has_many.rb', line 21

def creation_attributes
  attributes = super
  attributes[reflection.foreign_scope] = reflection.name.to_s
  attributes
end