I have a simple model called "foo" and I''m using the scaffold
generated
code. When I edit "foo" I want to be able to click a check box that
says
"update all". When the param is passed I cycle through all the
"foos" in
the database and update them with the single "foo" form variables...if
the
param isn''t passed then it only updates the selected "foo".
I have a sample that works but it bypasses all the validation. Also, I
get stale object errors because the lock_version for the unselected
models isn''t getting incremented when it''s selected for edit,
since it''s
never selected.
Has anyone done this before?
Thanks,
Scott
--
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
-~----------~----~----~----~------~----~------~--~---