diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 17:45:48 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 17:45:48 +0530 |
commit | 9c7c7104f6a6074681f554c016f1b15a9ef8d267 (patch) | |
tree | a2ae116d6eb89f5e501afc0304fdbc6e22ad7202 /activerecord | |
parent | 4148c686ec2582c457adf277dec5b3ff496627c8 (diff) | |
download | rails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.tar.gz rails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.tar.bz2 rails-9c7c7104f6a6074681f554c016f1b15a9ef8d267.zip |
Fix the named scope equality check
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 2 |
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 |