Sha256: ef6c0a796908101e55dddf36cf4571ca538a02dccdeddfdae324d93b706a9a53
Contents?: true
Size: 744 Bytes
Versions: 4
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true class WebhooksController < ::ApplicationController include ForemanWebhooks::Controller::Parameters::Webhook include Foreman::Controller::AutoCompleteSearch before_action :find_resource, only: %i[edit update destroy] def new @webhook = Webhook.new end def create @webhook = Webhook.new(webhook_params) if @webhook.save process_success success_redirect: '/webhooks' else process_error end end def edit; end def update if @webhook.update(webhook_params) process_success success_redirect: '/webhooks' else process_error end end def destroy if @webhook.destroy process_success else process_error end end end
Version data entries
4 entries across 4 versions & 1 rubygems