RailsCasts Pro episodes are now free!

Learn more or hide this

Bullet
Episode #372Aug 09, 201260 comments

Bullet

Bullet will notify you of database queries that can potentially be improved through eager loading or counter cache column. A variety of notification alerts are supported. (6 minutes)
Optimistic Locking (revised)
Episode #59Aug 04, 2012135 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)
Strong Parameters
Episode #371Aug 03, 201275 comments

Strong Parameters

The strong_parameters gem is an improvement over attr_accessible to securely handle mass assignment even when you have complex authorization logic. The functionality will likely be added to Rails 4 so it is a good idea to learn how it works. (12 minutes)
Ransack
Episode #370Aug 03, 201293 comments

Ransack

Ransack allows you to easily build complex search forms. It also helps in adding sortable links and building a dynamic advanced search page. (10 minutes)
Mongoid (revised)
Episode #238Jul 28, 201276 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)
Client-Side Performance
Episode #369Jul 24, 201260 comments

Client-Side Performance

Optimizing Rails performance can only take you so far. The client-side plays a big part in how fast a page feels. Here I show many tools that can help make your apps faster than ever. (14 minutes)
MiniProfiler
Episode #368Jul 24, 2012107 comments

MiniProfiler

MiniProfiler allows you to see the speed of a request conveniently on the page. It also shows the SQL queries performed and allows you to profile a specific block of code. (9 minutes)
Virtual Attributes (revised)
Episode #16Jul 20, 201271 comments

Virtual Attributes (revised)

Virtual attributes are a clean way to add form fields that do not map directly to the database. Here I show how to handle validations, associations, and more. (11 minutes)
Celluloid
Episode #367Jul 18, 201265 comments

Celluloid

Celluloid puts an object-oriented spin on multi-threaded development. Here I cover the fundamental features of Celluloid in several examples. (11 minutes)
Sidekiq
Episode #366Jul 18, 201280 comments

Sidekiq

Sidekiq allows you to move jobs into the background for asynchronous processing. It uses threads instead of forks so it is much more efficient with memory compared to Resque. (10 minutes)