diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-15 12:01:43 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-15 12:01:43 -0700 |
commit | 62e36ebba05778b76b97386d5771d3aafd5c4782 (patch) | |
tree | 92b3f9669abc268549132a56c59c455d1be4d1d1 /lib | |
parent | f4ea59ab4d76a2745ebf50f65bfbfe26f9db7195 (diff) | |
download | rails-62e36ebba05778b76b97386d5771d3aafd5c4782.tar.gz rails-62e36ebba05778b76b97386d5771d3aafd5c4782.tar.bz2 rails-62e36ebba05778b76b97386d5771d3aafd5c4782.zip |
right side set to sqlliteral if it is a string
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/select_manager.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index df3f21c3b6..20c97f198a 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -143,8 +143,12 @@ module Arel right = exprs.pop left = exprs.pop + right = Nodes::SqlLiteral.new(right) if String === right + right = Nodes::And.new left, right - exprs.reverse.inject(right) { |memo,expr| Nodes::And.new(expr, memo) } + exprs.reverse.inject(right) { |memo,expr| + Nodes::And.new(expr, memo) + } end end end |