Suppose that I have a hash of hashes as following. One can use "update" to update all the records as follows.
people = { 1 => { "first_name" => "David", "last_name" => "Freeman" }, 2 => { "first_name" => "Jeremy", "last_name" => "Stone" } .....}
Person.update(people.keys, people.values)
This will run an UPDATE query for each record. How can I use "update_all" to achieve this which runs a single query for all the records?
Referred to (this) but couldn't find the solution.
Thanks in advance.