From 27be568639ec14c9696f79d554301fa69cb8edae Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 13 Jun 2013 11:00:02 -0700 Subject: fix caching of automatic inverse of. :bomb: --- activerecord/lib/active_record/reflection.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3