mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use before_action instead of before_filter
This commit is contained in:
@@ -6,7 +6,7 @@ module DfcProvider
|
||||
class BaseController < ::ActionController::Base
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
||||
|
||||
before_filter :check_authorization,
|
||||
before_action :check_authorization,
|
||||
:check_user,
|
||||
:check_enterprise
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
module DfcProvider
|
||||
module Api
|
||||
class PeopleController < BaseController
|
||||
skip_before_filter :check_enterprise
|
||||
skip_before_action :check_enterprise
|
||||
|
||||
before_filter :find_user, :check_user_accessibility
|
||||
before_action :find_user, :check_user_accessibility
|
||||
|
||||
def show
|
||||
render json: @user, serializer: DfcProvider::PersonSerializer
|
||||
|
||||
Reference in New Issue
Block a user