Skip to content

Instantly share code, notes, and snippets.

@vrybas
Last active December 17, 2015 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrybas/5651863 to your computer and use it in GitHub Desktop.
Save vrybas/5651863 to your computer and use it in GitHub Desktop.
included do
scope :processing, where(state: 'processing')
scope :error, where(arel_table[:state].matches('%failed'))
scope :completed, where(state: %w( converted uploaded protected ))
end
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment