From 9c7c7104f6a6074681f554c016f1b15a9ef8d267 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Tue, 19 Jan 2010 17:45:48 +0530 Subject: Fix the named scope equality check --- activerecord/lib/active_record/named_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/named_scope.rb') 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 -- cgit v1.2.3