Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.
Models have a tendency to become a complex mess as an application grows. In this episode you will learn a couple of techniques to extract form-behavior out into its own class.
(18 minutes)
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)
Here I demonstrate how to perform bulk API operations though a single request using Rack middleware. This is great if you need to trigger multiple actions at once such as if the user goes offline.
(18 minutes)
A slow test suite can put a damper on test-driven development. In this episode I show a variety of ways to optimize specs including: selective testing, preloading Rails, and testing outside of Rails.
(17 minutes)
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)