Skip to content

Instantly share code, notes, and snippets.

@maker-leo
Created April 11, 2013 14:41
Show Gist options
  • Save maker-leo/5363920 to your computer and use it in GitHub Desktop.
Save maker-leo/5363920 to your computer and use it in GitHub Desktop.
How to find all questions where the answers user_id IS NULL
includes(:answers)
.where("user_id IS NULL OR user_id != ?", user_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment