diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-22 17:59:42 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-22 17:59:42 -0700 |
commit | bb1492e334e2d2efccb9d3c111648b895f626633 (patch) | |
tree | c8d3fee94674b6daa7c0509d75535f273b237e33 /activerecord/lib/active_record/associations | |
parent | 1ccc132832b8f01dece261bcaeb0a7da85444ee6 (diff) | |
download | rails-bb1492e334e2d2efccb9d3c111648b895f626633.tar.gz rails-bb1492e334e2d2efccb9d3c111648b895f626633.tar.bz2 rails-bb1492e334e2d2efccb9d3c111648b895f626633.zip |
decouple extensions from association object state
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index bbc1c20f60..cd0642c592 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -48,14 +48,14 @@ module ActiveRecord::Associations::Builder @model.generated_feature_methods end - include Module.new { def build; end } + include Module.new { def build(*args); end } def build validate_options define_accessors configure_dependency if options[:dependent] @reflection = model.create_reflection(macro, name, scope, options, model) - super # provides an extension point + super(@model, @reflection) # provides an extension point @reflection end |