aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-07 16:45:25 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-07 16:45:25 -0700
commit437a9a2225008ce859b4485dd5808843f40f8a58 (patch)
tree1db7425fb6e8d24fcd1aea51ddf992fb6f923fb5 /lib/arel/attributes
parent5ab502a755d0031d229278b6f14123c45623dd04 (diff)
downloadrails-437a9a2225008ce859b4485dd5808843f40f8a58.tar.gz
rails-437a9a2225008ce859b4485dd5808843f40f8a58.tar.bz2
rails-437a9a2225008ce859b4485dd5808843f40f8a58.zip
count takes distinct
Diffstat (limited to 'lib/arel/attributes')
-rw-r--r--lib/arel/attributes/attribute.rb4
1 files changed, 2 insertions, 2 deletions
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