Class: PipeRocket::EventsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/pipe_rocket/events_controller.rb

Instance Method Summary collapse

Instance Method Details

#handleObject



4
5
6
7
# File 'app/controllers/pipe_rocket/events_controller.rb', line 4

def handle
  json = params[:current] || params[:previous]
  ActiveSupport::Notifications.instrument "#{params[:object]}_#{params[:event]}", {params[:object].to_sym => "PipeRocket::#{params[:object].titleize}".constantize.new(json)}
end