GithubHelp home page GithubHelp logo

week5's Introduction

Week 5 Homework

This is the last homework assignment of the quarter!

Please put your completed app inside the "homework" folder.

Requirements

Create a Rails application that demonstrates a one-to-many model association as shown:

Click Here To See the Meetup App

  • The appearance/styling of your app doesn't matter.
  • The mechanics and business rules of your app should match those found in the Meetup App.
  • Your home page should show the list of events.
  • Create two resources: events and venues.
  • A venue has a name and address.
  • An event has a title, date and time, and venue.
  • HINT: Rails supports "datetime" as a column type when you generate your model/resource/scaffold that can store the date and time together in a single column.
  • A venue holds many events over time.
  • An event can only take place at one venue.
  • The list of venues must be shown in alphabetical order, both in the master list of venues as well as in any selection lists.
  • Each model must have at least one validation rule.
  • The UI should display validation error messages if the user tries to save invalid data.
  • You should use an application layout to provide a header area with global navigation links that are shared across every page.

Remember these key ideas:

  • Model associations are best implemented in the models themselves.
  • You'll have to figure out which model gets the foreign key.
  • You can use the has_many and belongs_to methods in your models if you want.
  • Avoid putting any explicit where clauses or find_by_id calls in your views.
  • The collection_select helper method can be tricky. There's an example in the code folder as well as in the model association PDF on the course website.

week5's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.