Git Product home page Git Product logo

010719-module-2-code-challenge-review's Introduction

Welcome to the Master Branch

This review focuses on creating ActiveRecord models with validations and and using nested forms. There are three steps each in their own branch. During the review we will move through each step and go over our answers:

  • step1 asks you to create the necessary migrations for our models
  • step2 asks you to add validations and associations
  • step3 asks you to complete app/views/orders/_form.html.erb as well as the related controller methods

Below is the README used throughout the exercise. Feel free to complete the app from scratch if you are looking for an extra challenge.

Module 2 Code Challenge Review

The Domain

We are going to write a site to help a small store keep track of user orders. They need to work with three things: users, orders, and items.

  • customer will have a first name, a last name, and an email address. Every customer must have a first name, a last name, and an email address. Two customer could have the same name, but they cannot have the same email. A customer should be able to have many orders.

  • items must have a name and a price. The price must be greater than 0, but might not be an integer (e.g. $12.99). No two items can have the same name. The same item can be on many orders.

  • orders must belong to exactly one customer and one item. Additionally, orders will have a 'quantity' which must be a whole number greater than or equal to 1.

User stories

Users of our website should be able to:

  1. See a list of all orders.
  2. Create a new order. When creating a new order they should be able to:
    1. Choose from a list of preexisting items and/or create a new item on the same page.
    2. Choose from a list of preexisting customers or create a new customer on the same page.
  3. Edit an order.

010719-module-2-code-challenge-review's People

Contributors

j-shilling avatar

Watchers

 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.