Flowdock
method

_update_record

Importance_0
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: ActiveRecord::Relation

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

These similar methods exist in v5.2.3:

_update_record(values, constraints) 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 70
    def _update_record(values, constraints) # :nodoc:
      substitutes, binds = substitute_values values

      scope = @klass.unscoped

      if @klass.finder_needs_type_condition?
        scope.unscope!(where: @klass.inheritance_column)
      end

      relation = scope.where(constraints)
      bvs = binds + relation.bound_attributes
      um = relation
        .arel
        .compile_update(substitutes, @klass.primary_key)

      @klass.connection.update(
        um,
        "SQL",
        bvs,
      )
    end
Register or log in to add new notes.