aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/builder/collection_association.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/collection_association.rb b/activerecord/lib/active_record/associations/builder/collection_association.rb
index 38a70f3efd..d640446a6d 100644
--- a/activerecord/lib/active_record/associations/builder/collection_association.rb
+++ b/activerecord/lib/active_record/associations/builder/collection_association.rb
@@ -25,8 +25,10 @@ module ActiveRecord::Associations::Builder
def define_callbacks(model, reflection)
super
+ name = reflection.name
+ options = reflection.options
CALLBACKS.each { |callback_name|
- define_callback(model, callback_name, reflection.name, reflection.options)
+ define_callback(model, callback_name, name, options)
}
end