Skip to content

Instantly share code, notes, and snippets.

@amy-mac
Created February 2, 2018 19:43
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 amy-mac/cba67e78928b31012e1e7face5db41d4 to your computer and use it in GitHub Desktop.
Save amy-mac/cba67e78928b31012e1e7face5db41d4 to your computer and use it in GitHub Desktop.
# All Dec 18th matches
Matches = Match.where("published_at >= ?", “12-18-2017”).reject { |m| m.user.deleted? || m.friend.deleted? }
# Filtered by the matches who haven’t seen their match:
matches.where(seen_at: nil)
# Filtered by the matches who have seen their match but didn’t message
matches.where(“seen_at IS NOT NULL”).reject { |m| m.all_messages.exists? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment