My app works as intended, however I have a question in regards to nested routes. In my routes file I have
resources :lists do
resources :items
end
and when I run rake:routes I get(shortened to save space)
list_items GET /lists/:list_id/items(.:format) items#index
POST /lists/:list_id/items(.:format) items#create
new_list_item GET /lists/:list_id/items/new(.:format) items#new
edit_list_item GET /lists/:list_id/items/:id/edit(.:format) items#edit
list_item GET /lists/:list_id/items/:id(.:format) items#show
When I follow tutorials or other material, their 'Prefix Verb' would only have action_item (i.e new_item) and the forms would only have
form_for @item
instead of what I have
form_for [@list, @item]
I was wondering if I was missing something, or doing something wrong. Any help or information is appreciated.