Problem Statement Create a named route. It should generate a path, for example, '/ zombies /: name', where: name is a parameter, and indicates the action of the index in ZombiesController. Name the route "graveyard"
resources resources
zombies id name graveyard 1 Ash Glen Haven Memorial Cemetary 2 Bob Chapel Hill Cemetary 3 Jim My Fathers Basement
My decision
TwitterForZombies::Application.routes.draw do match ':name' => 'Zombies#index', :as => 'graveyard' end
I also tried
TwitterForZombies::Application.routes.draw do match ':name' => 'Zombie#index', :as => 'graveyard' end
the error I get in both cases is
Sorry, Try Again Did not route to ZombiesController index action with :name parameter
What am I doing wrong?
source share