diff options
author | Emilio Tagua <miloops@gmail.com> | 2011-02-18 15:40:06 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2011-02-18 15:40:06 -0300 |
commit | 356086944ddf0a34def10c99d9fe5670e78e9065 (patch) | |
tree | 6bb3ef83c10326d9748f00dd4c81ef6795ef38ff /activerecord | |
parent | b8c2feb97e3f0df38b6fd28b38eaab7df3a03984 (diff) | |
download | rails-356086944ddf0a34def10c99d9fe5670e78e9065.tar.gz rails-356086944ddf0a34def10c99d9fe5670e78e9065.tar.bz2 rails-356086944ddf0a34def10c99d9fe5670e78e9065.zip |
Reindent and remove wrong line left in merge by mistake.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index ae745ea7c2..32eb9ee542 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -144,16 +144,15 @@ module ActiveRecord def load_target if find_target? begin - if IdentityMap.enabled? && association_class && association_class.respond_to?(:base_class) - @target = IdentityMap.get(association_class, @owner[@reflection.foreign_key]) - end + if IdentityMap.enabled? && association_class && association_class.respond_to?(:base_class) + @target = IdentityMap.get(association_class, @owner[@reflection.foreign_key]) + end rescue NameError nil ensure @target ||= find_target end end - @target = find_target if find_target? loaded! target rescue ActiveRecord::RecordNotFound |