I’m trying to get the following spec to work. So far I’ve had some success with making both of these cases work:
User/Tasks— Lists user’s tasks.User/Projects— List user’s projects.
But how do I get User/Project/Tasks to list all the tasks in the Project (all tasks in project, not just the user’s tasks in the project)?
My routes.rb is as following:
resources :users do
resources :tasks, :through => :projects
resources :projects
end
Can it not simply be accomplished with?
Feel free to keep the other route for
:tasksaround .. you’ll just have to handle which case it is in yourTasksController.