I would also like to know the correct way of doing a collection update. but I, generally, use ajax for check box, so when user clicks on the yes - no check box I make a put request to update 1 record at a time.
Aashish On Aug 8, 2:07 am, Tim Harding <[email protected]> wrote: > Hi, > > Today I added a checkbox to each row of a table and a save button, to > perform an Archive operation on N items in the table. > > This is essentially an update of the collection. > > My initial thought was to PUT to students_path but only GET and POST > are allowed using the Rails RESTful routing. > > I wound up adding an :collection => {:update_all => :put} to the > students routing and added an appropriate controller method. > > I'm not terribly happy with this, stylistically, though, > pragmatically, it works. > > What is the proper way to manage an update to a collection w/o having > to add an addition method to my controller? > > Thanks very much, > > -Tim -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

