diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-05 10:25:08 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-05 10:25:08 -0800 |
commit | 80f11e342d00a2177dd8e5684914855b87771c5b (patch) | |
tree | d85839732c622c1ebd9e2342e34538fd42994bd1 /lib | |
parent | d8005bcb892b0a41901da2cc4baf5e15706cb583 (diff) | |
parent | 30a74c09e794a46eac6bd0719f1b0333704317b2 (diff) | |
download | rails-80f11e342d00a2177dd8e5684914855b87771c5b.tar.gz rails-80f11e342d00a2177dd8e5684914855b87771c5b.tar.bz2 rails-80f11e342d00a2177dd8e5684914855b87771c5b.zip |
Merge pull request #161 from Noemj/master
Mysql2 prepared statements bind substitution fix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/bind_visitor.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/arel/visitors/bind_visitor.rb b/lib/arel/visitors/bind_visitor.rb index 0f1e38315b..77f91d9451 100644 --- a/lib/arel/visitors/bind_visitor.rb +++ b/lib/arel/visitors/bind_visitor.rb @@ -12,6 +12,15 @@ module Arel end private + + def visit_Arel_Nodes_Assignment o + if o.right.is_a? Arel::Nodes::BindParam + "#{visit o.left} = #{visit o.right}" + else + super + end + end + def visit_Arel_Nodes_BindParam o if @block @block.call @@ -19,6 +28,7 @@ module Arel super end end + end end end |