Permalink
Browse files

Use scoped.find directly rather than having a find_by_sql method

  • Loading branch information...
1 parent 1a4bbaf commit e8d7152a89f16a487a3d67d16a63bf065183b405 @jonleighton jonleighton committed Jan 24, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 activerecord/lib/active_record/associations/association_collection.rb
View
6 activerecord/lib/active_record/associations/association_collection.rb
@@ -32,7 +32,7 @@ def find(*args)
if @reflection.options[:finder_sql]
find_by_scan(*args)
else
- find_by_sql(*args)
+ scoped.find(*args)
end
end
@@ -560,10 +560,6 @@ def find_by_scan(*args)
load_target.select { |r| ids.include?(r.id) }
end
end
-
- def find_by_sql(*args)
- scoped.find(*args)
- end
end
end
end

0 comments on commit e8d7152

Please sign in to comment.