From e8d7152a89f16a487a3d67d16a63bf065183b405 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 24 Jan 2011 22:15:38 +0000 Subject: Use scoped.find directly rather than having a find_by_sql method --- .../lib/active_record/associations/association_collection.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 2b0ab32f34..5b9f2f99db 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -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 -- cgit v1.2.3