method

compile_update

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: Crud
compile_update(values, pk) 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/arel/crud.rb, line 7
    def compile_update(values, pk)
      um = UpdateManager.new

      if Nodes::SqlLiteral === values
        relation = @ctx.from
      else
        relation = values.first.first.relation
      end
      um.key = pk
      um.table relation
      um.set values
      um.take @ast.limit.expr if @ast.limit
      um.order(*@ast.orders)
      um.wheres = @ctx.wheres
      um
    end
Register or log in to add new notes.