Martin Gamsjaeger
2006-May-14 19:12 UTC
[Rails] Public class method ActiveRecord::Base.update
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
Benjamin Meichsner
2007-Jan-10 15:02 UTC
Re: Public class method ActiveRecord::Base.update
hey martin thats very interesting. did you found a solution yet? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---