Files
fizzy/app/controllers/webhooks/activations_controller.rb
T
David Heinemeier Hansson 2bf95f5b9a Just stick to default
2025-11-03 14:49:01 +01:00

15 lines
306 B
Ruby

class Webhooks::ActivationsController < ApplicationController
before_action :ensure_admin
before_action :set_webhook
def create
@webhook.activate unless @webhook.active?
redirect_to @webhook
end
private
def set_webhook
@webhook = Webhook.find(params[:webhook_id])
end
end