This document provides an overview of data and views in Rails. It introduces the Team, Location, and Game models and their attributes. It discusses database migrations, RESTful routes, the public folder for static files, and use of ERB templates for views with layouts and partials. It also covers ActiveRecord associations like belongs_to and has_many. The homework is to generate a Player scaffold and display players for a team on its page.
12. RESTful Routes
• GET /locations (show all locations)
• GET /locations/3 (show one location)
• POST /locations (make a location)
• PUT /locations/3 (update one location)
13. Can also be nested
• GET /locations/3/games (show games for
one location)
14. ‘public’ folder
• For all static files
• Rails looks here first
• Offers caching options
20. Homework
• Make a Player scaffold
• Show the players for a given team on that
team’s page
• (bonus) assign players on the team edit
page
• Help at http://railsforzombies.org/