diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-08 20:31:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-08 20:31:47 -0700 |
commit | 9443c01b80f0942025634c9bd22cb741c891090c (patch) | |
tree | 40a154ff055ecd59380fbbf3ad76cd5940eed980 /lib/arel/visitors | |
parent | 03e2006ad97cabb689e2a84bdbf9300baaf518b5 (diff) | |
download | rails-9443c01b80f0942025634c9bd22cb741c891090c.tar.gz rails-9443c01b80f0942025634c9bd22cb741c891090c.tar.bz2 rails-9443c01b80f0942025634c9bd22cb741c891090c.zip |
use if / else so my brain stops hurting
Diffstat (limited to 'lib/arel/visitors')
-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)}" |