Sha256: efeb270d3d21d1edb21f60c6f1334118baf6fa4c35d5ea8411f4cb89bb776f67
Contents?: true
Size: 531 Bytes
Versions: 10
Compression:
Stored size: 531 Bytes
Contents
class HooksController < ApplicationController skip_before_action :verify_authenticity_token def trigger event = "hooks:#{params[:hook]}" unless Houston.observer.observed?(event) render plain: "A hook with the slug '#{params[:hook]}' is not defined", status: 404 return end payload = params.except(:action, :controller).merge({ sender: { ip: request.remote_ip, agent: request.user_agent } }) Houston.observer.fire event, params: payload head 200 end end
Version data entries
10 entries across 10 versions & 1 rubygems