From 49696e0a62f39648d82660c689d15e56bb5f5207 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 12 Jan 2011 12:12:42 -0800 Subject: @loaded is defined in initialize, so we should not need this --- activerecord/lib/active_record/associations/association_proxy.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index ba784fdb9d..c19ded242e 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -270,8 +270,6 @@ module ActiveRecord # ActiveRecord::RecordNotFound is rescued within the method, and it is # not reraised. The proxy is \reset and +nil+ is the return value. def load_target - return nil unless defined?(@loaded) - if !loaded? && (!@owner.new_record? || foreign_key_present?) && target_klass @target = find_target end -- cgit v1.2.3