Class: WebhooksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- WebhooksController
- Includes:
- Foreman::Controller::AutoCompleteSearch, ForemanWebhooks::Controller::Parameters::Webhook
- Defined in:
- app/controllers/webhooks_controller.rb
Instance Method Summary collapse
Methods included from ForemanWebhooks::Controller::Parameters::Webhook
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/webhooks_controller.rb', line 13 def create @webhook = Webhook.new(webhook_params) if @webhook.save process_success success_redirect: '/webhooks' else process_error end end |
#destroy ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/controllers/webhooks_controller.rb', line 32 def destroy if @webhook.destroy process_success else process_error end end |
#edit ⇒ Object
22 |
# File 'app/controllers/webhooks_controller.rb', line 22 def edit; end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/webhooks_controller.rb', line 9 def new @webhook = Webhook.new end |
#update ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/controllers/webhooks_controller.rb', line 24 def update if @webhook.update(webhook_params) process_success success_redirect: '/webhooks' else process_error end end |