instance method
before_save_collection_association
Ruby on Rails 3.0.20
Since v2.3.18 Last seen in v5.2.8.1 PrivateSignature
before_save_collection_association()
Is used as a before_save callback to check while saving a collection association whether or not the parent was a new record before saving.
Source
# File activerecord/lib/active_record/autosave_association.rb, line 296
def before_save_collection_association
@new_record_before_save = new_record?
true
end
Defined in activerecord/lib/active_record/autosave_association.rb line 296
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AutosaveAssociation