day 100 — code 365

Mon 21 Mar 2016

WDI Week 5 (Day 21)

Things we did today:

  1. Warmup: Roman > Arabic numerals (Ruby)
  2. Active Record: Associations
  3. Rails: RESTful MVC, Scaffold, Routes, Controllers, Views
  4. Lab: Stock and Movie App
  5. Homework: Games on Rails

The warmup exercise was interesting — we placed the code inside of a Ruby Class, which was useful in figuring out (a bit more) about how things work inside of Classes — like how variables aren’t handed down to new instances unless they are class variables (@@like_this), and how we can hand data (like hashes) down by placing them inside methods (which, when called, simply return that hash).


Added ERB package for Emmet:

Control + Shift + .

adds <% %> automatically!


Can’t style option elements in CSS (in Chrome) :(

An alternative is to use ul > li and then use jQuery to display the list upon clicking.


Figure out how long since last reboot


Figure out who’s logged on:



Ruby helper method



Today we continued on with making simple web apps with routes — mainly interacting through forms — get methods — no database interaction yet — that’s for tomorrow. This was exciting — the separation of concerns (with separate routes.rb, controller folders, view folders) — awesome.

We made a “Game Wall” app for homework — using forms and routing to create ‘Magic 8 Ball’, ‘Guess the number’, and ‘Scissors Paper Rock’ games.

Looking forward to working with Databases tomorrow!

Thanks for stopping by!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.