特定コントローラーのアクションにbefore_actionの例外をつける
schoolコントローラーindexアクションのみbefore_actionでnot_registered_schoolをスキップしたいとき(ややこしい、、、)
class ApplicationController < ActionController::Base
before_action : not_registered_school,except: [:index] ,if: :school_controller?
def school_controller?
self.controller_name == "school"
end
def not_registered_school
*******
end
たれみみ (@taremimi_7)