diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 46804a3b93..a94daccd34 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -126,13 +126,13 @@ module ActiveRecord def load_target if !@owner.new_record? || foreign_key_present begin - @target = find_target if !loaded? + @target = find_target unless loaded? rescue ActiveRecord::RecordNotFound reset end end - loaded if target + loaded target end |