From eef61ab909b614ce6f2d100cfb50044c063bc24a Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Wed, 29 Sep 2010 20:08:57 -0400 Subject: Support Attribute#asc and Attribute#desc to create orderings --- lib/arel/attributes/attribute.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/arel/attributes') diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb index 25ffe717b2..ba18533590 100644 --- a/lib/arel/attributes/attribute.rb +++ b/lib/arel/attributes/attribute.rb @@ -151,6 +151,14 @@ module Arel grouping_all :lteq, others end + def asc + Nodes::Ordering.new self, :asc + end + + def desc + Nodes::Ordering.new self, :desc + end + private def grouping_any method_id, others -- cgit v1.2.3