問題文は、名前付きルートを作成します。'/zombies/:name' のようなパスを生成する必要があります。ここで、:name はパラメーターであり、ZombiesController のインデックス アクションを指します。ルートに「墓場」という名前を付けます
リソースはリソースです
zombies
id name graveyard
1 Ash Glen Haven Memorial Cemetary
2 Bob Chapel Hill Cemetary
3 Jim My Fathers Basement
私の解決策は
TwitterForZombies::Application.routes.draw do
match ':name' => 'Zombies#index', :as => 'graveyard'
end
私も試しました
TwitterForZombies::Application.routes.draw do
match ':name' => 'Zombie#index', :as => 'graveyard'
end
どちらの場合でも発生するエラーは
Sorry, Try Again
Did not route to ZombiesController index action with :name parameter
私は何を間違っていますか??