Last week we did a whole lot of Ruby View coding, using HTML and ERB to build websites. This week we’re going to focus on routing in the lecture, and then use routing to build a rails site that uses views and models together. You can start off by watching the Recap of Week 3 and then taking the week 3 quiz before viewing the week 3 solutions.

Week 4 Videos

First we’re going to loosely define routes to be a combination of URL and HTTP verb, then we’re going to dig into the different parts of a URL in this vide:

Next we explore HTTP and HTTP verbs. We will go over the differences between GET and POST requests.

We continue on with the concept of REST (REpresentational State Transfer) and RESTful routes, don’t worry it sounds scarier than it is.

Finally we bring all of these concepts together to show you how you can make a combination of a URL & HTTP verb (a route) render a view action in your application:

Exercise

When you’re done watching the material for the week, head on over to the Routes, View & Model Exercise. We’ll take a look at how the view and model can interact to fetch data from our database as well as to insert data. We’ll be making our own routes and learning a bit about how to use the log. Hope you have as much fun doing this exercise as I had writing it.

Thanks

You’re almost half way done with the course by now, I’m glad you decided to pick up Rails & Ruby, the world needs more people like you! To help follow along you can subscribe to my youtube channel, where I always post videos before I write my blog entries. You can also follow my tumblr or @schneems on twitter if you like this course, or you just want more material on Ruby, Rails and programming.