Giter Site home page Giter Site logo

join-the-fun-rails-dc-web-career-040119's Introduction

Join the Fun

Instructions

Flatiron School has started its own taxi service, FlatironX, and we need to start developing the application's domain model!

Three basic models have already been created, Passenger, Ride, and Taxi. Just run rake db:migrate and rake db:migrate RAILS_ENV=test to apply the migrations to the development and test databases, respectively.

The next step is set up a has_many :through relationship between these three models so that we can keep track of who's driving who around. It will work like this:

Taxi -< Rides >- Passengers

This way, a taxi can have many passengers, and a passenger can have many taxis!

Each table only has a primary key, so you'll need to write a migration to get the database ready to handle the "has_many :through" relationship.

Check out the join table section in the Active Record Association Rails Guide.

Run the tests using the rspec or learn test command.

Resources

View Join the Fun on Learn.co and start learning to code for free.

join-the-fun-rails-dc-web-career-040119's People

Contributors

sarogers avatar irmiller22 avatar roseweixel avatar maxwellbenton avatar danielseehausen avatar fislabstest avatar ipc103 avatar fs-lms-test-bot avatar ihollander avatar kthffmn avatar peterbell avatar rrcobb avatar timothylevi avatar ahimmelstoss avatar lkwlala avatar

Watchers

James Cloos avatar Kevin McAlear avatar  avatar Victoria Thevenot avatar Belinda Black avatar Bernard Mordan avatar  avatar Joe Cardarelli avatar Sara Tibbetts avatar  avatar Sophie DeBenedetto avatar  avatar Antoin avatar Alex Griffith avatar  avatar Amanda D'Avria avatar  avatar Scott Ungchusri avatar Nicole Kroese  avatar Lore Dirick avatar Lisa Jiang avatar Vicki Aubin avatar  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.