Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Hacking with Arel

#355 Hacking with Arel pro

May 30, 2012 | 15 minutes | Active Record, Refactoring, Search
Here I show a variety of ways to rewrite a long SQL query using only Active Record and Arel. This includes generating scopes dynamically, adding an "or" operator, and adding a powerful "match" method.