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
20 changed files with 93 additions and 120 deletions

View File

@ -14,6 +14,10 @@ class Admin::AnnouncementsController < Admin::BaseController
@announcement = Announcement.new
end
def edit
authorize :announcement, :update?
end
def create
authorize :announcement, :create?
@ -28,10 +32,6 @@ class Admin::AnnouncementsController < Admin::BaseController
end
end
def edit
authorize :announcement, :update?
end
def update
authorize :announcement, :update?