Use scoped.find directly rather than having a find_by_sql method

This commit is contained in:
Jon Leighton
2011-01-24 22:15:38 +00:00
parent 1a4bbaf106
commit e8d7152a89

View File

@@ -32,7 +32,7 @@ module ActiveRecord
if @reflection.options[:finder_sql]
find_by_scan(*args)
else
find_by_sql(*args)
scoped.find(*args)
end
end
@@ -560,10 +560,6 @@ module ActiveRecord
load_target.select { |r| ids.include?(r.id) }
end
end
def find_by_sql(*args)
scoped.find(*args)
end
end
end
end