Skip to content

Instantly share code, notes, and snippets.

@methyl
Created April 16, 2014 11:46
Show Gist options
  • Save methyl/10859574 to your computer and use it in GitHub Desktop.
Save methyl/10859574 to your computer and use it in GitHub Desktop.
class GithubWebhooksController
def payload
case event
when 'push' then handle_push
when 'delete' then handle_delete
end
end
private
def handle_push
# code
end
def handle_delete
# code
end
def event
request.headers['X-Github-Event']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment