how to model editing of multiple related resources on the same webpage?
Posted
by amikazmi
on Stack Overflow
See other posts from Stack Overflow
or by amikazmi
Published on 2010-04-12T08:27:48Z
Indexed on
2010/04/12
8:33 UTC
Read the original article
Hit count: 210
rest
|ruby-on-rails
Lets say we have a Company model, that has many Employees And has many Projects
If we want to show the projects, we'll go to
"/company/1/projects/index"
If we want to edit 1 project, we'll go to
"/company/1/projects/1/edit"
What if we want to edit all the projects at once on the same webpage?
We can go to "/company/1/edit" and put a nested forms for all the projects
But what if we need a different webpage to edit all the employees at once too?
We can't use "/company/1/edit" again..
Right now we do "/company/1/projects/multiedit", "/company/1/projects/multupdate"- but as you can see, it's not rest.
How can we model this restfully?
© Stack Overflow or respective owner