diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-24 01:33:18 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-24 01:33:18 +0530 |
commit | efd0bd3b7390ebb8526b981169025f2860f6a113 (patch) | |
tree | 1cb3bcd8f9534f64e8a764af1010ce65303b42b0 /activerecord/lib/active_record/named_scope.rb | |
parent | f4571e3617ccd9cc9e5ee9f7431066bd80395e22 (diff) | |
parent | 8ff2fb6f3aa6140f5a8bd018d5919a8a1e707cda (diff) | |
download | rails-efd0bd3b7390ebb8526b981169025f2860f6a113.tar.gz rails-efd0bd3b7390ebb8526b981169025f2860f6a113.tar.bz2 rails-efd0bd3b7390ebb8526b981169025f2860f6a113.zip |
Merge remote branch 'mainstream/master'
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index 92030e5bfd..ff6c041ef4 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) @@ -176,13 +164,8 @@ module ActiveRecord end end - def count(*args) - options = args.extract_options! - options.present? ? apply_finder_options(options).count(*args) : super - end - def ==(other) - to_a == other.to_a + other.respond_to?(:to_ary) ? to_a == other.to_a : false end private |