Module: ActiveRecord::AutosaveAssociation::AssociationBuilderExtension

Defined in:
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 '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 'lib/active_record/autosave_association.rb', line 138

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