Skip to content

Instantly share code, notes, and snippets.

@rrichardsonv
Created January 11, 2017 00:13
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 rrichardsonv/c9f89c3b45a7dfc21dda126b448d390f to your computer and use it in GitHub Desktop.
Save rrichardsonv/c9f89c3b45a7dfc21dda126b448d390f to your computer and use it in GitHub Desktop.
Cams_query
self.guesses.select(:card_id).group(:card_id).having("count(*) = 1").length
#returns number of correct cards on first guess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment