method
replace_named_bind_variables
replace_named_bind_variables(statement, bind_vars)
protected
Hide source
# File activerecord/lib/active_record/base.rb, line 2055 def replace_named_bind_variables(statement, bind_vars) #:nodoc: statement.gsub(/:([a-zA-Z]\w*)/) do match = $1.to_sym if bind_vars.include?(match) quote_bound_value(bind_vars[match]) else raise PreparedStatementInvalid, "missing value for :#{match} in #{statement}" end end end