Hi guys,
i have a model named "project" and i have created routes namespace:
namespace :project do
resources :inprocess do
get 'assign', :on => :collection
end
resources :suggested do
get 'select_list', :on => :collection
post 'select_list', :on => :collection
end
resources :finished
end
One of the routes that i get is new_project_suggested (which is
working fine with the new action) and the edit_project_suggested which
i get an error.
I am calling this action in the "select_list" view:
<% @suggested.each do |s| %>
<tr><td><%= link_to "#{s.title}", edit_project_suggested_path(s)
%><td></tr>
<% end %>
Hi guys,
i have a model named "project" and i have created routes namespace:
namespace :project do
resources :inprocess do
get 'assign', :on => :collection
end
resources :suggested do
get 'select_list', :on => :collection
post 'select_list', :on => :collection
end
resources :finished
end
I think you're abusing nested resources. inprocess, suggested, and
finished probably shouldn't be resources of their own. What are you
trying to achieve here?
Hi Marnen,
i have created a projects controller with a field called status. The
"status" have the following values: "suggested", "inprogress" and
"finished". I want to be able to use these actions:
project/suggested/new
project/suggested/1/edit
project/suggested/assign_to_student
...
...
project/finished/new
project/finished/1/edit
etc
The goal is to be able to edit,update,create, delete (and some other
actions) a project while having a specific status. The forms in each
value should be different.