Module: ActiveRecord::AutosaveAssociation::AssociationBuilderExtension

Defined in:
activerecord/lib/active_record/autosave_association.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


134
135
136
# File 'activerecord/lib/active_record/autosave_association.rb', line 134

def self.included(base)
  base.valid_options << :autosave
end

Instance Method Details

#buildObject


138
139
140
141
142
# File 'activerecord/lib/active_record/autosave_association.rb', line 138

def build
  reflection = super
  model.send(:add_autosave_association_callbacks, reflection)
  reflection
end