Instead of doing find(:all) which does scoped.find(:all) which does scoped.all, just do scoped.all.

This commit is contained in:
Jon Leighton
2011-05-13 23:40:56 +01:00
parent 5d4799d593
commit 8a1de9b252

View File

@@ -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