instance method before_save_collection_association

Ruby on Rails 3.2.22.5

Since v2.3.18 Last seen in v5.2.8.1 Private

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1

Signature

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 316
    def before_save_collection_association
      @new_record_before_save = new_record?
      true
    end

Defined in activerecord/lib/active_record/autosave_association.rb line 316 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::AutosaveAssociation

Type at least 2 characters to search.

↑↓ navigate · open · esc close