60a429e463
These match Basecamp and the existing predicate methods
15 lines
326 B
Ruby
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
|