我正在尝试跳过其他控制器的ApplicationController
中定义的之前动作,但是skip_before_action
不起作用:(
class ApplicationController < ActionController::Base
include Pundit
include ActionView::Helpers::NumberHelper
protect_from_forgery with: :null_session
before_action :authenticate_usuario!
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :set_paper_trail_whodunnit
before_action :set_default_host_mailer
...
class Api::V1::AuthController < ApplicationController
include DeviseTokenAuth::Concerns::SetUserByToken
skip_before_action :authenticate_usuario!
...
这是服务器的答案
Completed 401 Unauthorized in 25ms (Views: 0.5ms | ActiveRecord: 0.0ms)