Created
February 8, 2012 22:35
-
-
Save Spaceghost/1774929 to your computer and use it in GitHub Desktop.
This file contains 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
Question.where( | |
QuestionSkipCount.where( | |
question_id: Question.where(messages_count: 0).all.map(&:id), # 1.Returns all question id's for each question without a message | |
# Pending | |
).all # 2.Gets all question_skip_counts for each question that has no message | |
).all # 3.Gives all the questions that have no messages, and (soon) the least amount of skips. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment