Last active
August 29, 2015 14:04
-
-
Save danlopez/670f40f9a38726e5be48 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
#contexts => ["mini_meet_submissions#rate:vote"] | |
#action => [:contexts => "mini_meet_submissions#rate"] | |
def self.does_context_match?(contexts, action) | |
if contexts == nil | |
return true | |
end | |
contexts.push("*").each do |c| | |
if(c.start_with? *action[:contexts]) | |
return true | |
end | |
end | |
false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment