method

update_all

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: BatchEnumerator
update_all(updates) public

Updates records in batches. Returns the total number of rows affected.

Person.in_batches.update_all("age = age + 1")

See Relation#update_all for details of how each batch is updated.

Show source
Register or log in to add new notes.