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 @@ def inverse_name 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 @@ def automatic_inverse_of inverse_name end end + + false end # Checks if the inverse reflection that is returned from the