-
-
Save radar/3038312 to your computer and use it in GitHub Desktop.
Finding a record meeting two requirements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Conversation.where("(user_id = :current_user OR user_id = :other_user) AND (recipient_id = :current_user OR recipient_id = :other_user)", :current_user => current_user.id, :other_user => user.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment