diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-24 22:15:38 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-01-30 11:58:07 +0000 |
commit | e8d7152a89f16a487a3d67d16a63bf065183b405 (patch) | |
tree | 65eae541150d5ecfbedcabb351d38f273d41b749 /activerecord/lib | |
parent | 1a4bbaf106f09c8a67c7e4da109a46449c06374f (diff) | |
download | rails-e8d7152a89f16a487a3d67d16a63bf065183b405.tar.gz rails-e8d7152a89f16a487a3d67d16a63bf065183b405.tar.bz2 rails-e8d7152a89f16a487a3d67d16a63bf065183b405.zip |
Use scoped.find directly rather than having a find_by_sql method
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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 |