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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5e518814b76962fdd1ad0e74dfac5ea7?d=identicon&s=25 Martin Gamsjaeger (Guest)
on 2006-05-14 21:14
(Received via mailing list)
Hiall,

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 ..

cheers
Martin
112c3dcf580abee701d2f5630e767ac2?d=identicon&s=25 Benjamin Meichsner (benni)
on 2007-01-10 16:02
hey martin

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