aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/named_scope.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-19 17:45:48 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-19 17:45:48 +0530
commit9c7c7104f6a6074681f554c016f1b15a9ef8d267 (patch)
treea2ae116d6eb89f5e501afc0304fdbc6e22ad7202 /activerecord/lib/active_record/named_scope.rb
parent4148c686ec2582c457adf277dec5b3ff496627c8 (diff)
downloadrails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.tar.gz
rails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.tar.bz2
rails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.zip
Fix the named scope equality check
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r--activerecord/lib/active_record/named_scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb
index 92030e5bfd..f1b8822892 100644
--- a/activerecord/lib/active_record/named_scope.rb
+++ b/activerecord/lib/active_record/named_scope.rb
@@ -182,7 +182,7 @@ module ActiveRecord
end
def ==(other)
- to_a == other.to_a
+ other.respond_to?(:to_a) ? to_a == other.to_a : false
end
private