Skip to content

Instantly share code, notes, and snippets.

@phlegx
Created November 25, 2014 12:15
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 phlegx/8213c49e6be3b6b2cfdc to your computer and use it in GitHub Desktop.
Save phlegx/8213c49e6be3b6b2cfdc to your computer and use it in GitHub Desktop.
scope :by_provider, lambda{ |cpf| joins(common: [{ channels: :authentication }]).where("provider IN (#{cpf})") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment