Permalink
Browse files

tag bind params with a bind param object

  • Loading branch information...
1 parent 563df87 commit f48a33be7db20db753ff06f430daf71ba31b0770 @tenderlove tenderlove committed Feb 21, 2012
View
2 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -166,7 +166,7 @@ def quote_table_name(name)
# 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 ====================================
View
2 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -66,7 +66,7 @@ def quote_string(string)
end
def substitute_at(column, index)
- Arel.sql "\0"
+ Arel::Nodes::BindParam.new "\0"
end
# CONNECTION MANAGEMENT ====================================
View
2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -721,7 +721,7 @@ def execute(sql, name = nil)
end
def substitute_at(column, index)
- Arel.sql("$#{index + 1}")
+ Arel::Nodes::BindParam.new "$#{index + 1}"
end
class Result < ActiveRecord::Result

0 comments on commit f48a33b

Please sign in to comment.