Sign in through GitHub
What's New in Rails 4
Episode #400Jan 04, 201326 comments

What's New in Rails 4

Rails 4.0 is still unfinished, but it is shaping up to become a great release. Here I show how to setup a new Rails 4.0 (edge) application and walk through many of its new features. (20 minutes)
Autocomplete Search Terms
Episode #399Dec 31, 201217 comments

Autocomplete Search Terms

Learn how to add autocompletion to a search form and improve performance using Rack middleware, caching and switching from SQL to Redis. (17 minutes)
Service Objects
Episode #398Dec 18, 201244 comments

Service Objects

Models can quickly become a grab-bag of unrelated methods if behavior is constantly being pushed from the controller. Here I show how to refactor this using Concerns and Service Objects. (12 minutes)
Model Name in URL (revised)
Episode #63Dec 16, 201214 comments

Model Name in URL (revised)

A model's ID in the URL is not very helpful to the user. Consider adding the name which can also improve SEO. Learn how to override to_param, add a slug attribute, and make a catch all route for deep nesting. (9 minutes)
Action View Walkthrough
Episode #397Dec 09, 201212 comments

Action View Walkthrough

Find out exactly what Rails is doing under the hood when it renders a view template for a response. What object context handles the template? How does the lookup process work? That and more covered in this code walkthrough. (15 minutes)
Importing CSV and Excel
Episode #396Dec 08, 201252 comments

Importing CSV and Excel

Allow users to import records into the database by uploading a CSV or Excel document. Here I show how to use Roo to parse these files and present a solution for validations. (10 minutes)
Action Controller Walkthrough
Episode #395Dec 02, 20125 comments

Action Controller Walkthrough

Do you ever wonder what goes on behind the scenes when a Rails controller handles a request? What do the "render" and "redirect_to" methods do exactly? This and more covered as we walk through the code of ActionController::Base. (11 minutes)
Tree-Based Navigation (revised)
Episode #162Dec 01, 20127 comments

Tree-Based Navigation (revised)

If your Rails app is content-heavy, consider organizing it in a tree menu structure. Here I show how to add top-level tabs, nested links in a side bar, and breadcrumbs to go up the hierarchy. (10 minutes)
STI and Polymorphic Associations
Episode #394Nov 25, 201219 comments

STI and Polymorphic Associations

Single Table Inheritance (STI) can help organize branching logic into separate classes, but a polymorphic association may be a better fit if there are unique database columns. (14 minutes)
Guest User Record
Episode #393Nov 21, 201230 comments

Guest User Record

Instead of presenting a sign up form to the user, consider creating a temporary guest record so the user can try out the application without filling in their information up front. They can then become a permanent member afterwards. (9 minutes)