Sorry, this is a naive question.
I have a nested resources depth 2 levels.
resources :programs do
resources :questions do
resources :answers
end
end
So for the index,edit, etc pages to work I need to modify the link_to
attribute for show
, edit
, new
buttons in the views.
For eg,
<%= link_to 'Show', edit_question_path %>
How should I rename this edit_question_path
to? Should it be edit_question_program_path
or it should be edit_program_question_path
. I am confused of this convention, if we have programs->questions-> answers, then how should the convention be in the link_to
's path?. Please help