diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 10:24:41 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 10:24:41 -0700 |
commit | 3b5b5d99ff9f68f00d9e121715e429ddbd8795cf (patch) | |
tree | 2f8c14545c21a171cd26c6b5a6c8bc51788d1930 /lib | |
parent | 5d403e45858956e89d323e44ab7b413f80f5171f (diff) | |
download | rails-3b5b5d99ff9f68f00d9e121715e429ddbd8795cf.tar.gz rails-3b5b5d99ff9f68f00d9e121715e429ddbd8795cf.tar.bz2 rails-3b5b5d99ff9f68f00d9e121715e429ddbd8795cf.zip |
make the bindvalue visitor backwards compatible
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/bind_visitor.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/arel/visitors/bind_visitor.rb b/lib/arel/visitors/bind_visitor.rb index c316c8d702..c336e87395 100644 --- a/lib/arel/visitors/bind_visitor.rb +++ b/lib/arel/visitors/bind_visitor.rb @@ -25,7 +25,10 @@ module Arel def visit_Arel_Nodes_BindParam o, collector if @block - @block.call(collector) + val = @block.call + if String === val + collector << val + end else super end |