aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-06-13 11:00:02 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-06-13 11:00:02 -0700
commit27be568639ec14c9696f79d554301fa69cb8edae (patch)
tree0abfba160684e8978fb119d5a70ca344dc2422f1 /activerecord
parent634fd040dbabf3e268a6a4bf4a9136468222022f (diff)
downloadrails-27be568639ec14c9696f79d554301fa69cb8edae.tar.gz
rails-27be568639ec14c9696f79d554301fa69cb8edae.tar.bz2
rails-27be568639ec14c9696f79d554301fa69cb8edae.zip
fix caching of automatic inverse of. :bomb:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/reflection.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 72a05f12aa..496237a2f2 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -397,7 +397,7 @@ module ActiveRecord
if @automatic_inverse_of == false
nil
else
- @automatic_inverse_of = automatic_inverse_of
+ @automatic_inverse_of ||= automatic_inverse_of
end
end
end
@@ -419,6 +419,8 @@ module ActiveRecord
inverse_name
end
end
+
+ false
end
# Checks if the inverse reflection that is returned from the