0
0
Fork 0

Fix Rails/ActionOrder cop (#24692)

This commit is contained in:
Matt Jankowski 2023-04-30 00:46:39 -04:00 committed by GitHub
parent 470b8abb69
commit 6e226f5a32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 93 additions and 120 deletions

View file

@ -10,12 +10,20 @@ module Admin
@webhooks = Webhook.page(params[:page])
end
def show
authorize @webhook, :show?
end
def new
authorize :webhook, :create?
@webhook = Webhook.new
end
def edit
authorize @webhook, :update?
end
def create
authorize :webhook, :create?
@ -28,14 +36,6 @@ module Admin
end
end
def show
authorize @webhook, :show?
end
def edit
authorize @webhook, :update?
end
def update
authorize @webhook, :update?