2010-12-11 11 views
0

Rails3 - ネストされたリソース</p> <p>エラーネストされたリソースを使用する方法

No route matches {:controller=>"documents"} 

コード:

<%= link_to "Documentos", school_documents_path(@school) 

ルート:

resources :schools do 
    resources :documents, :only => [:index] 
    resources :tasks, :only => [:index] 
end 

がDocumentsController:

class DocumentsController < ApplicationController 
    def index 
    end 
end 

エラーは何ですか?

+0

あなたのコードは大丈夫です。私が見る限り、それはうまくいくはずです。 'レーキルート'とは何ですか?そしてあなたが言う行でエラーが発生することは絶対に確かですか? – iain

答えて

1

アプリケーションを再起動します。

0

これはタイプミスかもしれませんが、インデックス方法のendがありませんか?

+0

私はレールアプリを再起動する必要があるようです。 :) – Nerian

関連する問題