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?
rake routessay? And are you absolutely sure that the error occurs on the line you say it does?