aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-11 11:34:18 +0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-11 13:18:20 +0800
commit5daafa8e959acc64fc19e9522470282ac0f25f33 (patch)
tree7ca526824f312ac79ca71e491d9df7ea86b5aca7 /lib/arel/attributes
parent8ce904933db3ec9884194f07881581ec0cc8281e (diff)
downloadrails-5daafa8e959acc64fc19e9522470282ac0f25f33.tar.gz
rails-5daafa8e959acc64fc19e9522470282ac0f25f33.tar.bz2
rails-5daafa8e959acc64fc19e9522470282ac0f25f33.zip
Add Min node.
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 617112f681..34c1f45ba6 100644
--- a/lib/arel/attributes/attribute.rb
+++ b/lib/arel/attributes/attribute.rb
@@ -25,6 +25,10 @@ module Arel
Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id')
end
+ def minimum
+ Nodes::Min.new [self], Nodes::SqlLiteral.new('min_id')
+ end
+
def average
Nodes::Avg.new [self], Nodes::SqlLiteral.new('avg_id')
end