diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-11-10 15:23:54 -0500 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-11-10 15:23:54 -0500 |
commit | 0faeb5047407348533db952d9cf93ea59d2526dc (patch) | |
tree | b70d0ae90b9444a8b254278071b34c635852544b | |
parent | 3dbdaa399f1a15b5f6e770057342164a6deb9040 (diff) | |
download | rails-0faeb5047407348533db952d9cf93ea59d2526dc.tar.gz rails-0faeb5047407348533db952d9cf93ea59d2526dc.tar.bz2 rails-0faeb5047407348533db952d9cf93ea59d2526dc.zip |
Ruby 1.9: Array#to_s behaves like inspect now, so we don't want to use it here (needs spec!)
-rw-r--r-- | lib/arel/engines/sql/relations/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/engines/sql/relations/relation.rb b/lib/arel/engines/sql/relations/relation.rb index 2edbe6a5f7..b8f384a4c1 100644 --- a/lib/arel/engines/sql/relations/relation.rb +++ b/lib/arel/engines/sql/relations/relation.rb @@ -12,7 +12,7 @@ module Arel order = order.zip((0...order.size).to_a).map { |s,i| "id_list.alias_#{i} #{'DESC' if s =~ /\bdesc$/i}" }.join(', ') query = build_query \ - "SELECT #{select_clauses.to_s}", + "SELECT #{select_clauses.kind_of?(::Array) ? select_clauses.join("") : select_clauses.to_s}", "FROM #{table_sql(Sql::TableReference.new(self))}", (joins(self) unless joins(self).blank? ), ("WHERE #{where_clauses.join("\n\tAND ")}" unless wheres.blank? ), |