Code Monkey home page Code Monkey logo

kopi-tracker's Introduction

kopi-tracker

You are working at a kopi roastery. Create a rails app that tracks kopis.

Each individual kopi has a name and roastedness (roast), and is associtaed with an origin (farm where it comes from).

A kopi farm (origin) has a location, phone number and is associated with many kopis.

further

Migrate your app to track roastedness in a separate table. Use the seed.rb file to put the 7 kinds of roast into the DB.

roasts

Each kopi will have a roast.

A roast will have many kopis.

Using your models will look something like this:

# get all kopis that are dark roast
Roast.find_by(name: "Italian").kopis

further

Change your db model to include an order for a kopi. Change your kopi table to track price per pound. Add an order model. A kopi order has a weight. It is associated with a kopi.

further

For the routes /orders and /orders/:id include the total price of each order. (weight * price per pound)

further

Create a /report route that will display sales data.

In order to have data to display you should add more kopis and orders into your database from a seed file.

/report should display the total sales for that day.

further

Change /report to also display sales by kopi.

further

Change /report to also display sales by origin.

kopi-tracker's People

Contributors

awongh avatar donc24 avatar smallfurrr 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.