foo.where(:some_id => 1).update_all(:some_columnn => "1") is right way update foo? don't want find , update object.
yes right way, remember, no callbacks or validations executed.
btw, update_all accepts conditions also. this
foo.update_all({:some_columnn => "1"}, {:some_id => 1})
Comments
Post a Comment