Created
October 1, 2008 01:05
-
-
Save loe/13999 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
Hub.for_user_clean(current_user).collect{|hub| hub.owner.enhanced_security_allowed?}.any? | |
#this will loop through all hubs I want to short circuit as soon as the block is true for any. | |
# something like this but I can't quite get the syntax right | |
Hub.for_user_clean(current_user).collect{|hub| true && break if hub.owner.enhanced_security_allowed?} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment