Sign in through GitHub

RailsCasts Pro episodes are now free!

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.
  • Download:
  • source codeProject Files in Zip (80.4 KB)
  • mp4Full Size H.264 Video (38.7 MB)
  • m4vSmaller H.264 Video (18.5 MB)
  • webmFull Size VP8 Video (22.1 MB)
  • ogvFull Size Theora Video (43 MB)