Exercise

1. Create a new RAILS application

Instead of calling it sample lets call it healthtracker

2. Create the following About page for healthtracker

Notes;

  • create a controller called content and an action called about
  • should be located at http://localhost:3000/content/about
  • The above image is at http://www.healthsystems2020.org/files/1904_image_homepage3.jpg

3. Create a web page for Help.

  • use the same controller (content) and an action called help
  • should be located at http://localhost:3000/content/help

4. Use layouts to remove duplicate code for Header, Navigation and Footer

hint

http://gist.github.com/364408

5. Make about and help url’s pretty

change http://localhost:3000/content/about to http://localhost:3000/about

change http://localhost:3000/content/help to http://localhost:3000/help

hint

  • edit config/routes.rb
  • map.bonjour ‘bonjour’, :controller => ‘world’, :action => ‘hello’

6. Can you make the Navigation items About and Help clickable?