Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2017Spring

01.09.17 - 05.07.17

Rails I

CSYS2863

Tuesday Thursday
02:30 PM - 03:50 PM

Pet Shelter

Lab05

Objective: Practice working with and modifying scaffolds

pastdue

Submit Your Solution

Lab05

Request a Copy of your Solution

Lab05

Requirements

Application functions as described and allows all needed data to be managed50 pts
Navigation is present and works as described20 pts
Tests are present, complete, and passing30 pts
Total100 pts

Instructions

Overview

For this lab you will be creating a small partial web application for a pet shelter. The public portion of the site will focus on allowing potential adopters to review a list of animals available at the shelter based on animal type. The backend of the website will allow the owners of the shelter to manage their list of animals, their types, and the users of the administrative backend.

Public Pages

For the public portion of the application there only needs to be two pages. The first, which will be the homepage, should should a list of all of the types of animals the shelter shelters. The list should include dogs, cats, birds, rodents, snakes, and lizards. Each of the animal types should be hyperlinks that when clicked will take the visitor to the second of the public pages which will display all of the animals in the shelter of that type. Clicking "dog" on the homepage would show the visitor a list of all dogs, for example.

Private Pages

For the backend of the application any logged in user should have a full set of pages for listing, viewing, creating, editing, or destroying animal types and animals of each specific type. When the user is creating or editing an animal they should be required to say what type of animal it is and should only have the option of choosing one of the types that are available. In addition to the type each animal should have a name, a weight, a color and a description.

Authentication

Only users that are present in the user table of the database should be able to login to use the backend of the application. Any user who is logged in should have the ability to list, view, edit, create, or destroy any users in this table, including themselves. Each user only needs a username and password.

Navigation

The application should include enough links to make all parts of the site visitable without having to type a URL but a visitor should never be shown a link that they are not authorized to visit. As a result any non-logged in user should only be able to visit the pubic pages and the login page.

Testing

As always, at least one test needs to be present for each controller action. In addition to those you should add at least one action to each controller confirming that a private page can not be accessed unless logged in.