Class: ScopedAssociations::ActiveRecord5::HasOne::ScopedHasOneAssociation
- Inherits:
-
ActiveRecord::Associations::HasOneAssociation
- Object
- ActiveRecord::Associations::HasOneAssociation
- ScopedAssociations::ActiveRecord5::HasOne::ScopedHasOneAssociation
- Defined in:
- lib/scoped_associations/activerecord5/has_one.rb
Instance Method Summary collapse
Instance Method Details
#creation_attributes ⇒ Object
21 22 23 24 25 |
# File 'lib/scoped_associations/activerecord5/has_one.rb', line 21 def creation_attributes attributes = super attributes[reflection.foreign_scope] = reflection.name.to_s attributes end |