From 7b122f9a336c8c780dcc5a29074f17f3ec493dc6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 8 Sep 2010 15:08:00 -0700 Subject: adding maximum nodes --- lib/arel/attributes/attribute.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/arel/attributes') 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 -- cgit v1.2.3