Skip to content

Instantly share code, notes, and snippets.

@lgrayland
Created August 17, 2016 09:02
Show Gist options
  • Save lgrayland/cf6da3846afd124f0c3a0ef5e77036c2 to your computer and use it in GitHub Desktop.
Save lgrayland/cf6da3846afd124f0c3a0ef5e77036c2 to your computer and use it in GitHub Desktop.
Subscription.where([
"user_id NOT IN (?) OR channel_id NOT IN (?)",
User.pluck("id"),
Channel.pluck("id")
]).destroy_all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment