1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

removing incorrect comment and string concatenation

This commit is contained in:
Aaron Patterson 2011-04-22 12:21:59 -05:00
parent 96acdd3ec4
commit a37722182f

View file

@ -929,10 +929,7 @@ module ActiveRecord
order_columns.delete_if { |c| c.blank? }
order_columns = order_columns.zip((0...order_columns.size).to_a).map { |s,i| "#{s} AS alias_#{i}" }
# Return a DISTINCT ON() clause that's distinct on the columns we want but includes
# all the required columns for the ORDER BY to work properly.
sql = "DISTINCT #{columns}, "
sql << order_columns * ', '
"DISTINCT #{columns}, #{order_columns * ', '}"
end
protected