From db503c4142d85cc1d2d511873f8eb7e7250bbedb Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 24 Jan 2011 20:58:43 +0000 Subject: load_target returns the target --- activerecord/lib/active_record/associations/association_collection.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 50c69abefb..c112f2b5d0 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -22,8 +22,7 @@ module ActiveRecord def select(select = nil) if block_given? - load_target - @target.select.each { |e| yield e } + load_target.select.each { |e| yield e } else scoped.select(select) end -- cgit v1.2.3