diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/mssql.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/visitors/mssql.rb b/lib/arel/visitors/mssql.rb index cc077d863b..49f79c527d 100644 --- a/lib/arel/visitors/mssql.rb +++ b/lib/arel/visitors/mssql.rb @@ -59,7 +59,7 @@ module Arel end def determine_order_by x - unless x.groups.empty? + if x.groups.any? "ORDER BY #{x.groups.map { |g| visit g }.join ', ' }" else "ORDER BY #{find_left_table_pk(x.froms)}" |