Railsの学習(ROUTING INTO DARKNESS)
最後のLevel5のROUTING INTO DARKNESS です。
Level5 ROUTING INTO DARKNESS
Resources
問題1 Resouce Route
Create a resouces route for zombies
解答例
Resources
zombies
| id | name | graveyard |
| 1 | Ash | Glen Haven Memorial Cemetary |
| 2 | Bob | Chapel Hill Cemetary |
| 3 | Jim | My Fathers Basement |
問題2 Route Matching
Create a custom route so that /undead will go to the undead action on the ZombiesController
解答例
問題3 Route Redirecting
Create redirect /undead to /zombies
解答例
問題4 Root Route
Create a root route to ZombiesController index action
解答例
問題5 Named Route
Create a named route. It should generate a path like '/zombies/:name' where :name is a parameter, and points to the index action in ZombiesController. Name the route 'graveyard'
解答例
感想
とりあえずRails for Zombiesが終わったんでどんどん次にいきたいと思います。次はtestを見ていきます。