Skip to content

Instantly share code, notes, and snippets.

@laspluviosillas
Last active August 29, 2015 14:16
Show Gist options
  • Save laspluviosillas/1a027348c4dcc4aacda9 to your computer and use it in GitHub Desktop.
Save laspluviosillas/1a027348c4dcc4aacda9 to your computer and use it in GitHub Desktop.
Pseudo before_action
def before_action(options = {})
if options[:if].present?
return if !send(options[:if])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment