aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-08 15:08:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-08 15:08:00 -0700
commit7b122f9a336c8c780dcc5a29074f17f3ec493dc6 (patch)
treef1d76bf30258e0413d9ac032493225f3c4fdaddb /lib/arel/attributes
parent301dfa5a3888a41ea36324a390241538249e9a53 (diff)
downloadrails-7b122f9a336c8c780dcc5a29074f17f3ec493dc6.tar.gz
rails-7b122f9a336c8c780dcc5a29074f17f3ec493dc6.tar.bz2
rails-7b122f9a336c8c780dcc5a29074f17f3ec493dc6.zip
adding maximum nodes
Diffstat (limited to 'lib/arel/attributes')
-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 af9bbdd478..bb85af4634 100644
--- a/lib/arel/attributes/attribute.rb
+++ b/lib/arel/attributes/attribute.rb
@@ -16,6 +16,10 @@ module Arel
def sum
Nodes::Sum.new [self], Nodes::SqlLiteral.new('sum_id')
end
+
+ def maximum
+ Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id')
+ end
end
class String < Attribute; end