skip_before_action不起作用

时间:2018-07-23 16:45:41

标签: ruby-on-rails ruby

我正在尝试跳过其他控制器的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)

0 个答案:

没有答案