Last week, we started Ruby and Rails, this week we’re diving deeper into Rails and we hit a big milestone… the start of Project 2! Let’s get going.

Day 1: Checkpoint, Rails Review || two Labs:

We started off the day with a Checkpoint. Remember, Checkpoints are informal quizzes that help check yourself on where you’re at in the material.

Morning Rails Review or Lab - 2.5 hours:

After the Checkpoint, we were given two options: Rails Review with our instructor or a pair programming lab. I always love a good review session so I opted to review. Most of the class picked this option, making the review session upbeat and very informational.

Afternoon Lab: Hogwarts - 2.5 hours:

If you read previous weeks, you’ll know that I love labs! Lab day is my time to really dig into the code, break things, fix things, ask questions and feel proud when it’s all said and done.

One of my favorite things about GA is that our labs/homework are designed around pop culture themes such as Harry Potter, Game of Thrones, Pokemon, etc. Today we built a full CRUD app with nested resources and RESTful paths in Rails.

lab

Screenshot of my Rails lab


We ended the day at 5pm, with instructor’s office hours from 6-8pm.

Day 2: Outcomes && Rails: Users, Session & Flash:

Outcomes: 2.5 Hours:

In previous weeks, I realized I didn’t talk too much about Outcomes so I’m going to try to do a better job at explaining what happens every Tuesday morning.

Every Tuesday, we have an full hour from 9am-10am to prep for Outcomes. We aren’t in the classroom during this time. Mostly the class hangs out and chats about new job postings, resumes and portfolio ideas.

In class, we workshopped how to narrow down our job search strategy, what’s the must-haves versus nice-to-haves and how to get what we want in our next career. Lastly, we took professional head shots from a professional photographer.

Rails: Users, Session & Flash - 2.5 Hours:

Last week in class, we built our first Rails app, called Tunr. Tunr is a small CRUD app that lets you view artists and listen to snippets of their songs. It’s pretty cool.

In this lesson, we added a big feature to our Tunr app: User authentication. By that I mean the ability for a user to sign up, sign in and sign out of an application. This a big feature because up until this point, all of our applications have had one single user.

This was a heavy class so it was broken down into three parts:

  • Adding Sessions: 40 mins A crucial part to any website that lets users log on or off. Without sessions Amazon’s shopping carts wouldn’t be able to hold our stuff after every page refresh.

  • Add Permissions: 30 mins Now that users can log in and out, permissions are rules for the users to what they can and cannot do while login. Such as an user should only be able to modify their own email/password.

  • Adding Flash: 30 mins Flash is a built in feature of Rails that we use to display errors messages or alerts on the browser for users. This class was hands on and code heavy. Which makes for a great class. Felt really good about today.


Day 3: Devise && Rails Many-to-Many

Devise - 2.5 Hours:

Yesterday, we spent a lot of time adding users, permissions and updating flash messages. Today, we learned of a cool little gem called Devise.

devise

Devise is a gem that simplifies implementing user authentication. Literally, it simplifies the implementation of users all in one gem. I highly recommend it for quickly getting users up and running… Read more about Devise.

We spent the class installing devise, linking up our sign in pages, limiting user abilities, and customizing devise’s views.

Rails Many-to-Many - 2.5 Hours:

Previously, we created our Rails app with one-to-one and one-to-many relationships. This class, we went beyond that and ventured into many-to-many relationships.

Simply put, a many-to-many relationship means there’s records that have more than one relationship in one table with a record in another table. Many-to-many applications are pretty common in web applications… and in life! For example, theaters can show many movies and movies are shown in many theaters. And unlike one-to-many, we can’t simply add a foreign key… we actually need to create a separate table called a ‘join table’.

We spent the class adding a new model called Favorites to our Tunr app. By updating the controller, view and routes, our users can now have favorite songs on many different songs. A pretty awesome feature.

Homework is due tomorrow by 9am (per usual). It may be helpful noting that Wednesdays are the days more than half my classmates stay behind and work on homework. Although homework is posted in our calendar a week before, the lessons taught on Wednesdays usually bring the assignment all together… so there’s some strategy in our procrastination! ;)

Day 4: Full Lab Day

After waking up entirely too early, I realized that I work much better staying up late rather than waking up early to get the homework in by 9am. My biggest advice is to figure out what works for you as soon as possible. I’m definitely hitting the coffee hard today.

Game of Thrones: All Day Lab

Good thing it’s lab day! Another fun theme from our instructors - Houses of Westeros. The assignment is build a Rails app with two models: Houses and Characters, creating migrations and seed our data to our database.

GoT

Game of Thrones Lab: Houses of Westeros


I had a lot of trouble with my lab. Unfortunately, creating the schema, migrating, seeding and connecting relationships between my two models gave me tons of trouble. However, along with all the problems, came a lot of ‘a-ha’ moments. The ‘a-ha’ moments are the moments you’ll carry with you through out your career.

I completed my lab, submitted before 5pm, and although I had many problems, I learned a lot and I still feel optimistic about Rails.

Day 5: Project 2: Building Our First Full-stack Application

Omgz, you guys! It’s here. Project 2 is here. Can you guess what Project 2 is all about? If you said Rails, ding ding ding, you are CORRECT!

Technical Requirements:

The app must…

  • Be built in Rails.
  • Have at least 2 models with at least 1 association (more if it makes sense).
  • Have complete RESTful routes for at least one of your resources with GET, POST, PUT, and DELETE.
  • Have error handling & validations for all resources
  • Utilize an ORM to create a database table structure (e.g. ActiveRecord) and interact with your relationally-stored data.
  • Have semantically-clean HTML and CSS that passes the standard validators.
  • Record and publish a video on Youtube describing your process, showing off your code, and speaking about things you’ll like to add to your app


We have until no later than next Thursday at 2pm to complete our project and its deliverables. Open office hours will be available every day from 10am-12:30pm and from 6-8pm. However, this time, our instructors are making us leave the nest a bit… we must submit a Github Issue for any assistance outside of open office hours!

Whew. Next week is project week where I’ll share my Youtube video, Github link and project picture gallery with you all. Happy Coding!


Latoya M. Watson

Blogging about Tech and Food Stuff from Washington, D.C.