diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-05-13 23:40:56 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-05-13 23:53:02 +0100 |
commit | 8a1de9b2522b0c270d5f59bfba524638ebd2ca76 (patch) | |
tree | 1907e0988f6e3944a5adfc24fdf9b8ac7109a6fd | |
parent | 5d4799d5933d43ce753e313c6d6d0d47343acfdc (diff) | |
download | rails-8a1de9b2522b0c270d5f59bfba524638ebd2ca76.tar.gz rails-8a1de9b2522b0c270d5f59bfba524638ebd2ca76.tar.bz2 rails-8a1de9b2522b0c270d5f59bfba524638ebd2ca76.zip |
Instead of doing find(:all) which does scoped.find(:all) which does scoped.all, just do scoped.all.
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 858317550d..4429c655a2 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -379,7 +379,7 @@ module ActiveRecord if options[:finder_sql] reflection.klass.find_by_sql(custom_finder_sql) else - find(:all) + scoped.all end records = options[:uniq] ? uniq(records) : records |