Skip to content
This repository
Browse code

tag bind params with a bind param object

  • Loading branch information...
commit 79f0a9b642c6952de5406de2d38c1a67d25580c0 1 parent 36c8521
Aaron Patterson authored February 20, 2012
2  activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -128,7 +128,7 @@ def quote_table_name(name)
128 128
       # Returns a bind substitution value given a +column+ and list of current
129 129
       # +binds+
130 130
       def substitute_at(column, index)
131  
-        Arel.sql '?'
  131
+        Arel::Nodes::BindParam.new '?'
132 132
       end
133 133
 
134 134
       # REFERENTIAL INTEGRITY ====================================
2  activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -189,7 +189,7 @@ def quoted_false
189 189
       end
190 190
 
191 191
       def substitute_at(column, index)
192  
-        Arel.sql "\0"
  192
+        Arel::Nodes::BindParam.new "\0"
193 193
       end
194 194
 
195 195
       # REFERENTIAL INTEGRITY ====================================
2  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -594,7 +594,7 @@ def execute(sql, name = nil)
594 594
       end
595 595
 
596 596
       def substitute_at(column, index)
597  
-        Arel.sql("$#{index + 1}")
  597
+        Arel::Nodes::BindParam.new "$#{index + 1}"
598 598
       end
599 599
 
600 600
       def exec_query(sql, name = 'SQL', binds = [])

0 notes on commit 79f0a9b

Please sign in to comment.
Something went wrong with that request. Please try again.