aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/attributes/attribute.rb')
-rw-r--r--lib/arel/attributes/attribute.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb
index 464d78188a..af9bbdd478 100644
--- a/lib/arel/attributes/attribute.rb
+++ b/lib/arel/attributes/attribute.rb
@@ -12,6 +12,10 @@ module Arel
def count distinct = false
Nodes::Count.new [self], distinct
end
+
+ def sum
+ Nodes::Sum.new [self], Nodes::SqlLiteral.new('sum_id')
+ end
end
class String < Attribute; end