Permalink
Browse files

tag bind params with a bind param object

  • Loading branch information...
1 parent 36c8521 commit 79f0a9b642c6952de5406de2d38c1a67d25580c0 @tenderlove tenderlove committed Feb 21, 2012
View
2 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -128,7 +128,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
@@ -189,7 +189,7 @@ def quoted_false
end
def substitute_at(column, index)
- Arel.sql "\0"
+ Arel::Nodes::BindParam.new "\0"
end
# REFERENTIAL INTEGRITY ====================================
View
2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -594,7 +594,7 @@ def execute(sql, name = nil)
end
def substitute_at(column, index)
- Arel.sql("$#{index + 1}")
+ Arel::Nodes::BindParam.new "$#{index + 1}"
end
def exec_query(sql, name = 'SQL', binds = [])

0 comments on commit 79f0a9b

Please sign in to comment.