Files
fizzy/app/controllers/webhooks/activations_controller.rb
T
David Heinemeier Hansson 60a429e463 Use more naturally-sounding ensures
These match Basecamp and the existing predicate methods
2025-10-29 13:33:34 +01:00

15 lines
326 B
Ruby

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