aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-01-24 20:58:43 +0000
committerJon Leighton <j@jonathanleighton.com>2011-01-30 11:56:41 +0000
commitdb503c4142d85cc1d2d511873f8eb7e7250bbedb (patch)
tree96b92db3cc6292495f3fb027b0fc7cf5035f4b56
parentaa86420be24d7df9c07379bcf6f33904d0d41adc (diff)
downloadrails-db503c4142d85cc1d2d511873f8eb7e7250bbedb.tar.gz
rails-db503c4142d85cc1d2d511873f8eb7e7250bbedb.tar.bz2
rails-db503c4142d85cc1d2d511873f8eb7e7250bbedb.zip
load_target returns the target
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb3
1 files changed, 1 insertions, 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