- User.update_all("visible = true, active = 1", { :status => "active" })
- User.update_all("visible = true, active = 0", { :status => "pending" })
- User.update_all("visible = false, active = 1", { :status => "deleted" })
+ User.where(:status => "active").update_all(:visible => true, :active => 1)
+ User.where(:status => "pending").update_all(:visible => true, :active => 0)
+ User.where(:status => "deleted").update_all(:visible => false, :active => 1)