diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-12-31 09:59:38 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-12-31 09:59:38 -0300 |
commit | 5f23dad4e5b14e14f09068c1993d8cc0c0780ad8 (patch) | |
tree | ff7fb92ee31a11aba81dcff840369e9114833ecd /lib/arel/engines/sql/relations/relation.rb | |
parent | 818f019711d448a62ee11569f5ca1ba0ddfb3c2c (diff) | |
download | rails-5f23dad4e5b14e14f09068c1993d8cc0c0780ad8.tar.gz rails-5f23dad4e5b14e14f09068c1993d8cc0c0780ad8.tar.bz2 rails-5f23dad4e5b14e14f09068c1993d8cc0c0780ad8.zip |
Remove every new line when generating queries, this may build invalid queries on SQLite.
Diffstat (limited to 'lib/arel/engines/sql/relations/relation.rb')
-rw-r--r-- | lib/arel/engines/sql/relations/relation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/engines/sql/relations/relation.rb b/lib/arel/engines/sql/relations/relation.rb index 940f985358..78508595fd 100644 --- a/lib/arel/engines/sql/relations/relation.rb +++ b/lib/arel/engines/sql/relations/relation.rb @@ -15,7 +15,7 @@ module Arel "SELECT #{select_clauses.kind_of?(::Array) ? select_clauses.join("") : select_clauses.to_s}", "FROM #{from_clauses}", (joins(self) unless joins(self).blank? ), - ("WHERE #{where_clauses.join("\n\tAND ")}" unless wheres.blank? ), + ("WHERE #{where_clauses.join(" AND ")}" unless wheres.blank? ), ("GROUP BY #{group_clauses.join(', ')}" unless groupings.blank? ), ("HAVING #{having_clauses.join(', ')}" unless havings.blank? ), ("#{locked}" unless locked.blank? ) @@ -31,7 +31,7 @@ module Arel "SELECT #{select_clauses.join(', ')}", "FROM #{from_clauses}", (joins(self) unless joins(self).blank? ), - ("WHERE #{where_clauses.join("\n\tAND ")}" unless wheres.blank? ), + ("WHERE #{where_clauses.join(" AND ")}" unless wheres.blank? ), ("GROUP BY #{group_clauses.join(', ')}" unless groupings.blank? ), ("HAVING #{having_clauses.join(', ')}" unless havings.blank? ), ("ORDER BY #{order_clauses.join(', ')}" unless orders.blank? ), |