Reputation: 16197
How to use nested resources
Error:
No route matches {:controller=>"documents"}
Code:
<%= link_to "Documentos", school_documents_path(@school)
Routes:
resources :schools do
resources :documents, :only => [:index]
resources :tasks, :only => [:index]
end
DocumentsController:
class DocumentsController < ApplicationController
def index
end
end
What is the error?
Upvotes: 0
Views: 418
Reputation: 2811
this might be a typo but are you missing the end
from your index method?
Upvotes: 0