Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2013Spring

01.14.13 - 05.12.13

Rails I

CSYS2863

Tuesday Thursday
11:00 AM - 12:20 PM

TV Episodes and Series

Lab06

Objective: To work with Controllers and View for mutiple related subjects

pastdue

Submit Your Solution

Lab06

Request a Copy of your Solution

Lab06

Requirements

All controllers are RESTful10 pts
Series model created10 pts
Series controller created and has seven functioning RESTful actions 10 pts
Series and episodes are related as one to many15 pts
Series views are created according to the instructions20 pts
Episodes views are modified according to the instructions25 pts
All series fields are required10 pts
Total100 pts

Instructions

Introduction

For this lab you will be modifying your TV Episodes lab so that we will be able to have the episodes assigned to specific TV series.

Models

You will need to add a new model to your project for series which should contain fields for the series title (string), the series start date (date), and the series end date (date). All of the fields for series should be required. You will also need to add a field to the episodes model so that you can form a one to many relationship between episodes and series (one series can have many episodes).

Controllers

For series you will need a standard seven action controller like what you have for episodes.

Views

The views for episodes will need to be modified so that the index and show page list which series that episode belongs to. The new and edit pages will need to be modified so that a new or existing episode can be assigned to a series with a dropdown (select) showing the series that are available.

The views for the series should be standard with the exception that the show page should list all of the episode titles that belong to that series and the index page should show a count of how many episodes are in that series.