Skip to content

Instantly share code, notes, and snippets.

@papricek
Created January 30, 2012 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papricek/1704844 to your computer and use it in GitHub Desktop.
Save papricek/1704844 to your computer and use it in GitHub Desktop.
What a syntax sugar!
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