Class: Webhooks::EventsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Webhooks::EventsController
- Defined in:
- app/controllers/webhooks/events_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/webhooks/events_controller.rb', line 19 def create @event = Webhooks::Event.new(event_params) if @event.save redirect_to event_path(@event), flash: { success: 'Successfully created new webhook event.', } else render :new end end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/webhooks/events_controller.rb', line 7 def index @events = Webhooks::Event.order(created_at: :desc) end |