Skip to content

Instantly share code, notes, and snippets.

@johncausey
Created July 3, 2012 07:40
Show Gist options
  • Select an option

  • Save johncausey/3038304 to your computer and use it in GitHub Desktop.

Select an option

Save johncausey/3038304 to your computer and use it in GitHub Desktop.
Finding a record meeting two requirements
Conversation.where("user_id = '#{current_user.id}' OR '#{user.id}' AND recipient_id = '#{current_user.id}' OR '#{user.id}'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment