Assignment 1
Scaffolded Applications
Due Friday April 6 before 11:30pm

Overview

For this project, you will create a Rails scaffolded app and write a report of your experience.

Model Design

Design a model consisting of 3 or 4 attributes and their data types. Your model should have a singular name (e.g. movie) and each attribute should be a property that describes an instance of your model name.

Scaffold creation

  1. Create a new Rails folder the indicates the theme (e.g. cinema) of your web application. Example: rails new cinema.
  2. Switch to the folder of your web application (e.g. cd cinema) and generate the scaffold around your model. Example: rails generate scaffold Movie title:string year:integer seen:boolean.
  3. Generate the database table: rails db:migrate
  4. Test that your app runs: rails server

Note if you are using Rails installed in the computer labs, you may need to make this modification in the app/assets/javascripts/application.js file:

  //= require_tree
to
  // require_tree

Modifications

Make at least one modification to one of the components (view, controller, model, routing system) of the Rails architecture.

Data access through the console

Open the Rails console (rails console) and add at least one record to your database using Rails ActiveRecord. See online guide for examples.

Submission

For this project, you only need to submit a one-page report that summarizes your process of completing these steps. The report should be single-spaced and effectively formatted with headers, code excerpts and possibly bulleted lists. The report should address all of the process elements presented above.

Grading

This assignment is worth 10 points. A well presented report that addresses all of the requirements will receive 10 points.