Choose your own Adventure

Readme Homework


Episode 5 - Choose Your Own Adventure

Creating adventures using data access

Panda Assignment

  1. The pages need a Preview. Add a preview to the page. For example, "Go into the Forest", which is your choice when selecting A or B.
  2. Edit the content so it's very clear if I'm a winner (I get 30 gold!) or a loser (Eaten by sharks!? bummer!)

Tiger Assignment

  1. Extract the Page.creates out into a db/seed.rb file and load it
  2. Create a two step workflow. This has an intro page with two selections, each of which lead to a conclusion

Eagle Assignment

  1. Refactor so that the page doesn't have a parent -- instead it stores the id's of its options (option_a_id, option_b_id)
  2. Cross the paths so that there is a common page that you'll reach in the 3rd tier

License

Copyright Jesse Wolgamott 2012, MIT License. See LICENSE

Choose your own Adventure

  • Area:

    Databases  
  • Runtime:

    1:17  
  • Tech:

    postgres, activerecord  
  • Tags:

     

This week is one of my favorites --- I used to love the Choose Your Own Adventure book as a kid (where you'd flip from one page to another depending on the choices you make).

This week, we'll be doing the same thing. We'll build upon our Postgres and ActiveRecord knowledge in Episode 3 -- so if you're still having trouble with Postgres, let's get that settled first.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

ABOUT RUBY OFF RAILS

Ruby Off Rails is dedicated to accelerating the mastering of Ruby and increasing developer happiness everywhere.

In my software training, I see two distinct sets of programmers: those who know Ruby, and those who haven’t learned it yet. People who learn Ruby have an easier time understanding Rails, gems, and what magic voodoo is going on. And most importantly, they can cast wicked voodoo themselves.