Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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