は私のルートこの浅いルートのために私のフォームに何が間違っていますか?ここ
resources :games do
resources :message_templates, :shallow => true
私のすくいルートがこの
game_message_templates GET /games/:game_id/message_templates(.:format) message_templates#index
POST /games/:game_id/message_templates(.:format) message_templates#create
new_game_message_template GET /games/:game_id/message_templates/new(.:format) message_templates#new
edit_message_template GET /message_templates/:id/edit(.:format) message_templates#edit
message_template GET /message_templates/:id(.:format) message_templates#show
PUT /message_templates/:id(.:format) message_templates#update
DELETE /message_templates/:id(.:format) message_templates#destroy
と私の_form.erb、この
<% form_for(@message_template) do |f| %>
のように見えますが、私はこのエラー
を得るようなものですundefined method `message_templates_path'
'@のmessage_template'は何ですか?詳細情報が必要です。 –
いつエラーが表示されますか?フォームの初期表示またはエラーが発生した場合やフォーム提出の場合 –
'message_template'モデルと' controller'コードの両方を表示すると、より良い、速く、より正確で適切な答えを得ることができます。 –