Skip to content
Browse files

Fix the named scope equality check

  • Loading branch information...
1 parent 4148c68 commit 9c7c7104f6a6074681f554c016f1b15a9ef8d267 @lifo lifo committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/named_scope.rb
View
2 activerecord/lib/active_record/named_scope.rb
@@ -182,7 +182,7 @@ def count(*args)
end
def ==(other)
- to_a == other.to_a
+ other.respond_to?(:to_a) ? to_a == other.to_a : false
end
private

0 comments on commit 9c7c710

Please sign in to comment.
Something went wrong with that request. Please try again.