Stop writing SQL in your ActiveRecord scopes: embrace Ruby!