Class: SipgateIo::EventsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/sipgate_io/events_controller.rb', line 8

def create
  (head 500 and return) unless params.key?(:event)

  event = create_event(params)

  (head 500 and return) if event.invalid?


  answer = event.process
  render xml: answer
end