Removing deprecation warning (#16572)

Prior to this commit, I saw the following in the Rails test log:

```
DEPRECATION WARNING: 'include Pundit' is deprecated. Please use 'include Pundit::Authorization' instead.
 (called from include at ./app/controllers/application_controller.rb:12)
 ```
This commit is contained in:
Jeremy Friesen 2022-02-15 05:02:47 -05:00 committed by GitHub
parent 3982b389f1
commit 663a712a10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
module Api
module V0
class ListingsController < ApiController
include Pundit
include Pundit::Authorization
include ListingsToolkit
# actions `create` and `update` are defined in the module `ListingsToolkit`,

View file

@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
include SessionCurrentUser
include ValidRequest
include Pundit
include Pundit::Authorization
include CachingHeaders
include ImageUploads
include DevelopmentDependencyChecks if Rails.env.development?
@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base
def not_authorized
render json: { error: I18n.t("application_controller.not_authorized") }, status: :unauthorized
raise NotAuthorizedError, "Unauthorized"
raise Pundit::NotAuthorizedError, "Unauthorized"
end
def bad_request