RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails xRevised Episodes x
Site-Wide Announcements (revised)
Episode #103 – Nov 12, 2012 – 95 comments

Site-Wide Announcements (revised)

Here I show how to add an announcement message at the top of every page in the application and allow the user to permanently hide it. This is all done test-first and even includes testing the JavaScript behavior. (11 minutes)
The Logger (revised)
Episode #56 – Apr 13, 2012 – 63 comments

The Logger (revised)

The log file will show what is going on behind the scenes of a Rails request. Learn how to log messages, add tags, override formatting, and more. (6 minutes)
Model Name in URL (revised)
Episode #63 – Dec 16, 2012 – 85 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)
Optimistic Locking (revised)
Episode #59 – Aug 04, 2012 – 135 comments

Optimistic Locking (revised)

There is a chance one user will unintentionally override someone else's changes if they update a record near the same time. One solution is to use optimistic locking. The updated_at column can also be used for this as shown. (8 minutes)
Time Zones (revised)
Episode #106 – Oct 28, 2012 – 93 comments

Time Zones (revised)

Active Support makes it easy to work with time zones. Learn how to add a Time Zone select field to a user form and watch out for the gotchas. (7 minutes)
Token Fields (revised)
Episode #258 – May 05, 2012 – 158 comments

Token Fields (revised)

The Chosen plugin makes it easy to turn a many-to-many select menu into a searchable token field. Then see how the jQuery Tokeninput field can help with AJAX loading and creating new records. (10 minutes)
Charts & Graphs (revised)
Episode #223 – Sep 15, 2012 – 116 comments

Charts & Graphs (revised)

If you have a lot of data, consider adding a graph to provide an overview of it. Here I show how to use Morris.js to chart an Order model and visualize trends in the data. (12 minutes)
Devise and OmniAuth (revised)
Episode #235 – Jul 13, 2012 – 134 comments

Devise and OmniAuth (revised)

In this episode I build upon a standard Devise setup and show how to add 3rd party authentication using OmniAuth. This includes support for user validations and is compatible with normal password authentication. (10 minutes)
PDFs with Prawn (revised)
Episode #153 – Nov 03, 2011 – 82 comments

PDFs with Prawn (revised)

Prawn is an excellent Ruby library for generating PDF documents. Here you will learn how to add it to a Rails application through a separate PDF renderer class. (11 minutes)
Mongoid (revised)
Episode #238 – Jul 28, 2012 – 76 comments

Mongoid (revised)

Mongoid is a Ruby gem for interacting with MongoDB. Here I show the basics of setting up an app, querying for records, adding embedded associations, overriding the id, and more. (9 minutes)