aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/select_manager.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-07 11:02:38 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-07 11:02:38 -0700
commit4ef7ee8f35fdefd6eeef102f46497295a7b5d858 (patch)
tree1ed33cea7b15a3a99fd5d146b1b23aa72cd73d55 /lib/arel/select_manager.rb
parentc14c5c16f27eb1d6769ed2dd55028187f8d121a8 (diff)
downloadrails-4ef7ee8f35fdefd6eeef102f46497295a7b5d858.tar.gz
rails-4ef7ee8f35fdefd6eeef102f46497295a7b5d858.tar.bz2
rails-4ef7ee8f35fdefd6eeef102f46497295a7b5d858.zip
doing sql literal conversion
Diffstat (limited to 'lib/arel/select_manager.rb')
-rw-r--r--lib/arel/select_manager.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb
index e362f369e7..c8cd37b9fa 100644
--- a/lib/arel/select_manager.rb
+++ b/lib/arel/select_manager.rb
@@ -19,7 +19,11 @@ module Arel
end
def project *projections
- @ctx.projections.concat projections
+ # FIXME: converting these to SQLLiterals is probably not good, but
+ # rails tests require it.
+ @ctx.projections.concat projections.map { |x|
+ String == x.class ? SqlLiteral.new(x) : x
+ }
self
end