Specified where custom ActiveRecord query is