Railsの学習(THE VIEW AIN'T ALWAYS PRETTY)
続いて、Level 3 のTHE VIEW AIN'T ALWAYS PRETTYです。
Level 3 Challenges
Resources
zombies
| id | name | graveyard |
| 1 | Ash | Glen Haven Memorial Cemetary |
| 2 | Bob | Chapel Hill Cemetary |
| 3 | Jim | My Fathers Basement |
問題1 Views Simple
Print out the Zombie's name and graveyard
解答例
問題2 Linking
Link to show the zombie. Use the zombie's name as the anchor text
解答例
問題3 Each Blocks
Use an each block to print the names of all the Zombies.
解答例
Resources
zombies
| id | name | graveyard |
| 1 | Ash | Glen Haven Memorial Cemetary |
| 2 | Bob | Chapel Hill Cemetary |
| 3 | Jim | My Fathers Basement |
tweets
| id | status | zombie_id |
| 1 | Where can I get a good bite to eat? | 1 |
| 2 | My left arm is missing, but I don't care | 2 |
| 3 | I just ate some delicious brains | 3 |
| 4 | OMG, my fingers turned green. #FML | 1 |
問題4 If
In the each block, if a Zombie has more than 1 tweet, print out SMART ZOMBIE
解答例
問題5 Linking In Blocks
In the each block, make the Zombie's name link to its edit page
解答例