ã³ã³ããã¼ã©ã¼ã®ã¢ã¯ã·ã§ã³ï¼ã¡ã½ããï¼ã«å¯¾ããèªå¯ã®ã¡ã«ããºã ãæä¾ããã¾ãã èªå¯ã®ããªã·ã¼ã¯Policyã¯ã©ã¹ã«è¨±å¯ã®å¦çãèªåã§å®è£ ãã¾ãã Gem ApplicationController app/controllers/application_controller.rbã«include Punditã追å ãã¾ãã ï¼ãã®ä¾ã§ã¯current_userãèªå¯ã®å¯¾è±¡ã®ã¦ã¼ã¶ã§ããï¼ èªå¯ã«å¤±æããã¨rescue_fromã®user_not_authorizedã¡ã½ããã§ãªãã¤ã¬ã¯ãããã¾ãã class ApplicationController < ActionController::Base include Pundit protect_from_forgery with: :exception helper_method :current_user before_action
{{#tags}}- {{label}}
{{/tags}}