Created
April 3, 2013 12:17
-
-
Save ikataitsev/5300689 to your computer and use it in GitHub Desktop.
counting q
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
class Activity < ActiveRecord::Base | |
# Activity#result is a boolean | |
end | |
# Let's say | |
Activity.all.pluck(:result) # => [false, true, false, false, false, true] | |
# How can I calculate the number of the false results before that true one? |
roy
commented
Apr 3, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment