-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
> Since :update and :update_all are aliases of each other, every call of the form:
> Model.where(...).update(:foo => :bar)
> Will update multiple records. Is there a way to flag to just update one
record? Something like :multi => false in the 10gen driver. Sometimes I
just want to do Model.where(:_id => params[:id]).update(:foo => :bar)
without having it thinking it's a multi update or needing to first call
Model.find(params[:id]) and then model.update_attributes(:foo => :bar). The
former cuts down on the total number of database calls.