diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-26 21:37:25 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-26 16:27:12 -0700 |
commit | 9f5c18ce075179cfc73a00cba9a19d69aaf5274c (patch) | |
tree | b463005edeabe4a98337b557953672d07864a855 /activerecord/lib/active_record/associations/class_methods | |
parent | 57420dffb6663e31c12729ab3348cf824bfcff6a (diff) | |
download | rails-9f5c18ce075179cfc73a00cba9a19d69aaf5274c.tar.gz rails-9f5c18ce075179cfc73a00cba9a19d69aaf5274c.tar.bz2 rails-9f5c18ce075179cfc73a00cba9a19d69aaf5274c.zip |
Refactor we_can_set_the_inverse_on_this? to use a less bizarre name amongst other things
Diffstat (limited to 'activerecord/lib/active_record/associations/class_methods')
-rw-r--r-- | activerecord/lib/active_record/associations/class_methods/join_dependency.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb index a74d0a4ca8..bb6145656e 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb @@ -212,7 +212,7 @@ module ActiveRecord collection = record.send(join_part.reflection.name) collection.loaded collection.target.push(association) - collection.__send__(:set_inverse_instance, association, record) + collection.send(:set_inverse_instance, association) when :belongs_to set_target_and_inverse(join_part, association, record) else @@ -224,7 +224,7 @@ module ActiveRecord def set_target_and_inverse(join_part, association, record) association_proxy = record.send("set_#{join_part.reflection.name}_target", association) - association_proxy.__send__(:set_inverse_instance, association, record) + association_proxy.send(:set_inverse_instance, association) end end end |