aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/visitors/oracle.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb
index 8d6c15f37d..659b75f16d 100644
--- a/lib/arel/visitors/oracle.rb
+++ b/lib/arel/visitors/oracle.rb
@@ -54,11 +54,11 @@ module Arel
/DISTINCT.*FIRST_VALUE/ === projection
end
end
- orders = o.orders
+ orders = o.orders.map { |x| visit x }.join(', ').split(',')
o.orders = []
orders.each_with_index do |order, i|
o.orders <<
- Nodes::SqlLiteral.new("alias_#{i}__ #{'DESC' if /\bdesc$/i === order}")
+ Nodes::SqlLiteral.new("alias_#{i}__#{' DESC' if /\bdesc$/i === order}")
end
o
end