Permalink
Browse files

Instead of doing find(:all) which does scoped.find(:all) which does s…

…coped.all, just do scoped.all.
  • Loading branch information...
jonleighton committed May 13, 2011
1 parent 5d4799d commit 8a1de9b2522b0c270d5f59bfba524638ebd2ca76
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/collection_association.rb
@@ -379,7 +379,7 @@ def find_target
if options[:finder_sql]
reflection.klass.find_by_sql(custom_finder_sql)
else
- find(:all)
+ scoped.all
end
records = options[:uniq] ? uniq(records) : records

0 comments on commit 8a1de9b

Please sign in to comment.