Giter VIP home page Giter VIP logo

episode3's Introduction

Episode3: Watchman -- Datastores in YML and Postgres

Storing data in Postgres, with migrations, outside of Rails

Your Assignment

  1. Download and install PostgreSQL (see show notes)
  2. Clone, fork this repo and copy the config/database.yml.sample to config/database.yml, edit with values

Panda Level

  1. Add 2 more TV shows to the seeds file
  2. When I run ruby watchman.rb, have it output all TV shows

Tiger Level

  1. Ask the user what day they want to watch shows?
  2. Output only the shows matching that day of the week

Eagle (Advanced) Level

  1. Create a table (using the migrations) which represents a hobby of yours: Fishing, Sports, Cooking, etc.
  2. When I run ruby watchman.rb
    • Fill the table with 5 records (Recipe.create)
    • Have it show me all the records, with a nicely implemented to_s method
  • Ask me (the user) what I want to show. Example, if you have Recipe with :name and :ingredients:
[Recipes.all]
"Cornbread Muffins", [corn, butter, oil]
"Tacos", [tortilla, avacado, shrimp]

What would you like to learn more about?

#[editor: if I enter "Tacos" I'll see the Tacos recipe. If I enter nutella, I see "sorry Dave, I can't do that right now"]

Show Notes

Copyright: Jesse Wolgamott, MIT License (See LICENSE)

episode3's People

Contributors

jwo avatar ellesuzuki 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.