Created
January 30, 2012 14:59
-
-
Save papricek/1704844 to your computer and use it in GitHub Desktop.
What a syntax sugar!
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
def in_action?(actions) | |
actions = [actions] if actions.is_a?(String) | |
actions.map(&:to_s).include?(params[:action]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment