Reduce skip_before_action usage

This commit is contained in:
Sebastian Serth
2022-08-17 00:54:20 +02:00
parent 90bcd25ff2
commit 01f6b0d16e
4 changed files with 4 additions and 10 deletions

View File

@ -3,9 +3,6 @@
class CommentsController < ApplicationController
before_action :set_comment, only: %i[show update destroy]
# to disable authorization check: comment the line below back in
# skip_after_action :verify_authorized
def authorize!
authorize(@comment || @comments)
end