diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-20 18:16:56 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-20 18:16:56 -0800 |
commit | f48a33be7db20db753ff06f430daf71ba31b0770 (patch) | |
tree | 3996bb99b9be661e082f91a21fb8e8b25ad5cb0b /activerecord/lib/active_record/connection_adapters | |
parent | 563df87f19d21eb491f1c24dab0f59682fe0a737 (diff) | |
download | rails-f48a33be7db20db753ff06f430daf71ba31b0770.tar.gz rails-f48a33be7db20db753ff06f430daf71ba31b0770.tar.bz2 rails-f48a33be7db20db753ff06f430daf71ba31b0770.zip |
tag bind params with a bind param object
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
3 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 07c2bc44d9..c6af682d28 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -166,7 +166,7 @@ module ActiveRecord # Returns a bind substitution value given a +column+ and list of current # +binds+ def substitute_at(column, index) - Arel.sql '?' + Arel::Nodes::BindParam.new '?' end # REFERENTIAL INTEGRITY ==================================== diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 321d500da2..5ab9c24999 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -66,7 +66,7 @@ module ActiveRecord end def substitute_at(column, index) - Arel.sql "\0" + Arel::Nodes::BindParam.new "\0" end # CONNECTION MANAGEMENT ==================================== diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 9f21bcb0c9..3925a9634e 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -721,7 +721,7 @@ module ActiveRecord end def substitute_at(column, index) - Arel.sql("$#{index + 1}") + Arel::Nodes::BindParam.new "$#{index + 1}" end class Result < ActiveRecord::Result |