From 437a9a2225008ce859b4485dd5808843f40f8a58 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 7 Sep 2010 16:45:25 -0700 Subject: count takes distinct --- lib/arel/attributes/attribute.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb index 6087dc8e52..464d78188a 100644 --- a/lib/arel/attributes/attribute.rb +++ b/lib/arel/attributes/attribute.rb @@ -9,8 +9,8 @@ module Arel Nodes::In.new self, other end - def count - Nodes::Count.new [self] + def count distinct = false + Nodes::Count.new [self], distinct end end -- cgit v1.2.3