Class: GithubController

Inherits:
ApplicationController show all
Defined in:
app/controllers/github_controller.rb

Instance Method Summary collapse

Instance Method Details

#payloadObject



2
3
4
5
6
7
# File 'app/controllers/github_controller.rb', line 2

def payload
  render :nothing => true, :status => 404 and return unless params.keys.include?("token") && params["token"] == GithubConcern::Engine.token
  render :nothing => true, :status => 500 and return unless params["payload"]
  GitPush.create(:payload => JSON.parse(params["payload"]))
  render :nothing => true, :status => 200
end