I have a Rails application for project management where there are Project and Task models. A project can have many tasks, but a task can also have many tasks, ad infinitum.
Using nested resources, we can have /projects/1/tasks, /projects/1/tasks/new, /projects/1/tasks/3/edit etc.
However, how do you represent the recursive nature of tasks RESTfully? I don't want go another level deep, so perhaps the following would do:
map.resources :tasks do |t|
t.resources :tasks
end
That would give me the following urls:
/tasks/3/tasks/new
/tasks/3/tasks/45/edit
Or perhaps when it comes to an individual task I can just use /tasks/45/edit
Is this a reasonable design?
Cam