method

substitute_values

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: ActiveRecord::Relation
substitute_values(values) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation.rb, line 94
    def substitute_values(values) # :nodoc:
      binds = values.map do |arel_attr, value|
        [@klass.columns_hash[arel_attr.name], value]
      end

      substitutes = values.each_with_index.map do |(arel_attr, _), i|
        [arel_attr, @klass.connection.substitute_at(binds[i][0])]
      end

      [substitutes, binds]
    end
Register or log in to add new notes.