How to write update all conditionally queries in rails4
User.update_all({name: 'test'},{name: 'test1'}) # deprecated since Rails 4
or
User.where(name: 'test1').update_all(name: 'test')
User.where("name like 'test1'").update_all("name = 'test'")