mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
doing sql literal conversion
This commit is contained in:
parent
c14c5c16f2
commit
4ef7ee8f35
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue