diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-24 20:58:43 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-01-30 11:56:41 +0000 |
commit | db503c4142d85cc1d2d511873f8eb7e7250bbedb (patch) | |
tree | 96b92db3cc6292495f3fb027b0fc7cf5035f4b56 | |
parent | aa86420be24d7df9c07379bcf6f33904d0d41adc (diff) | |
download | rails-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.rb | 3 |
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 |