RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: migrations x
Guest User Record
Episode #393Nov 21, 2012101 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)
Tree-Based Navigation (revised)
Episode #162Dec 01, 201293 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, 201281 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)
Autocomplete Search Terms
Episode #399Dec 31, 201290 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)
Full-Text Search in PostgreSQL
Episode #343Apr 17, 2012131 comments

Full-Text Search in PostgreSQL

Postgres offers full-text searching right out of the box. This episode shows how to write queries from scratch, apply tools like Texticle and pg_search, and optimize performance through indexes. (16 minutes)
Devise (revised)
Episode #209Jul 06, 201275 comments

Devise (revised)

Devise is one of the most popular authentication plugins for Rails. Here I show how to set it up with a User model and configure the modules, views, routes, and more. (8 minutes)
REST API Versioning
Episode #350May 16, 2012108 comments

REST API Versioning

APIs should be consistent, but it is difficult to do this when returning a JSON response along side the HTML interface. Here I show how to add a versioned, RESTful API. The version can be determined from either the URL or HTTP headers. (10 minutes)
Semi-Static Pages (revised)
Episode #117Sep 02, 201270 comments

Semi-Static Pages (revised)

There are many ways to handle static pages in a Rails application. Here I show two approaches including one that uses a RESTful style PagesController to keep the content in the database (8 minutes)
Active Record Reputation System
Episode #364Jul 09, 2012105 comments

Active Record Reputation System

If you need to calculate an average user's rating or sum up a number of votes, consider using the activerecord-reputation-system gem. Here I will cover the basics and also briefly present a from-scratch solution. (10 minutes)
Hstore
Episode #345Apr 24, 201299 comments

Hstore

With hstore you can add schema-less data to PostgreSQL. This allows you to store model attributes without creating separate database columns. Watch how to do this using the activerecord-postgres-hstore gem. (10 minutes)