Forum: Ruby on Rails Public class method ActiveRecord::Base.update

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Martin G. (Guest)
on 2006-05-14 23:14
(Received via mailing list)

Given I use forms containing collections and use a statement like

Product.update(params[:product].keys, params[:product].values)

to update more than one product. What is the best way to determine if
this update operation was successfull? I read the apidoc and it says
that even if the save fails under validation, an array of products is
returned. Now do I have to loop through all those products and ask
them if they are new_record? I think I'm missing something ..

Benjamin M. (Guest)
on 2007-01-10 17:02
hey martin

thats very interesting. did you found a solution yet?
This topic is locked and can not be replied to.