diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-22 18:13:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-22 18:13:39 -0700 |
commit | a3b8ef8375056cd3b6a8cea49dec671f2a8f6c41 (patch) | |
tree | 0e9fd7645dcb8dc334ceabc91407a46910721095 /lib/arel/visitors | |
parent | 3283adc6d0edcc873256c78842f8ddd233577d08 (diff) | |
download | rails-a3b8ef8375056cd3b6a8cea49dec671f2a8f6c41.tar.gz rails-a3b8ef8375056cd3b6a8cea49dec671f2a8f6c41.tar.bz2 rails-a3b8ef8375056cd3b6a8cea49dec671f2a8f6c41.zip |
orders are working
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 401bdb3255..55ed53177e 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -45,6 +45,7 @@ module Arel def visit_Arel_Nodes_SelectStatement o [ o.cores.map { |x| visit x }.join, + ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?), ("LIMIT #{o.limit}" if o.limit) ].compact.join ' ' end |