From 565b4cd3e08c148a6c8f2e80c28029c6a8a51e6e Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 20 Jan 2010 03:40:37 +0530 Subject: Scope#find is no longer needed now that Relation#find handles all the cases --- activerecord/lib/active_record/named_scope.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index 2f3044d06b..d606934dce 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -148,18 +148,6 @@ module ActiveRecord relation end - def find(*args) - options = args.extract_options! - relation = options.present? ? apply_finder_options(options) : self - - case args.first - when :first, :last, :all - relation.send(args.first) - else - options.present? ? relation.find(*args) : super - end - end - def first(*args) if args.first.kind_of?(Integer) || (loaded? && !args.first.kind_of?(Hash)) to_a.first(*args) -- cgit v1.2.3