Sinatra Evite 1

This is the next in a sequence of Programming Assignments to get you more and more comfortable with Sinatra.

  • Your assignment is to use the samples of Sinatar code we’ve been working with and it will be tracking people, events and registrations. You can think of this as a simplistic Evite.
  • Make sure you write some tests to demonstrate that the code is actually working correctly, especially the associations.
  • Include a Readme as always which includes at least your name

Here is a suggested sequence:

  1. Start with one of the samples in sinatra_examples
  2. You will have three tables:
    • Person: name, date-of-birth, gender and zipcode
    • Events: name, date
    • Registrations: who is registering (person_id), what they are registering for (event_id), and status: a text field containing: coming, not coming, maybe.
  3. Create the migrations for those three tables
  4. At the url ./persons list all the persons
  5. At the url ./events list all the events
  6. At the url ./registrations list all the registrations
  7. At the url ./person/new: display a form allowing the creation of a person
  8. At the url ./event/new: display a form allowing the creation of a event
  9. At the url ./registration/new: display a form allowing the creation of a registrations

Deliverable

  • Simply zip up your working code and submit it to sintra
  1. Sinatra Tech Introduction
  2. ActiveRecord Basics Guide