Active Record Scopes and Arel by Jacob Swanner

1,036 views · Published 19 June 2012 · 28:29 · Indexed 23 September 2026

Channel: Confreaks · 2012 · Science & Technology

Watch on YouTube

Scopes are a great way of encapsulating query logic in a granular, reusable way. This talk will cover some techniques you can use to keep those scopes as composable and portable as possible. We'll cover how to use Arel directly, while avoiding the common practice of using SQL fragments, and show you how this can make your scopes more reusable, while at the same time preventing you from using database vendor specific operators, such as ILIKE.

Help us caption & translate this video!

http://amara.org/v/FGix/

More from this channel