#48 Console Tricks
Jun 22, 2007 | 10 minutes | Tools
The Rails console is one of my favorite tools. This episode is packed with tips and tricks on how to get the most out of the console.
Model Caching (revised)
Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record.
(12 minutes)
Fast Rails Commands
Rails commands, such as generators, migrations, and tests, have a tendency to be slow because they need to load the Rails app each time. Here I show three tools to make this faster: Zeus, Spring, and Commands.
(8 minutes)
Eager Loading (revised)
One way to improve performance is to reduce the number of database queries through eager loading. Here I demonstrate this and compare the difference between the "includes" and "joins" methods.
(7 minutes)
Activity Feed from Scratch
Creating an activity feed presents some interesting challenges. Here I share my thought process behind my implementation including when to use callbacks and a few tricks with partials.
(14 minutes)
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)