diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-22 12:21:59 -0500 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-22 12:21:59 -0500 |
commit | a37722182fd96190f2317ffd0450c49ed6d406f0 (patch) | |
tree | 8f12220e0a810118ae14022604ed1b8a2e6c8ff4 /activerecord/lib | |
parent | 96acdd3ec48594635314e768bf18805af6a40dde (diff) | |
download | rails-a37722182fd96190f2317ffd0450c49ed6d406f0.tar.gz rails-a37722182fd96190f2317ffd0450c49ed6d406f0.tar.bz2 rails-a37722182fd96190f2317ffd0450c49ed6d406f0.zip |
removing incorrect comment and string concatenation
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 5adb235835..203ecd2f03 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -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 |