繁体   English   中英

尝试使用邮递员登录时出现Rails路由错误

[英]Rails routing error when try to login using postman

在昨晚,一切正常,现在我正在启动Rails服务器并尝试登录,但显示如下

ActionController :: RoutingError(未初始化的常量ApplicationController :: Resaponse):

 app/controllers/application_controller.rb:2:in `<class:ApplicationController>' 

该应用程序变大了,我为这个错误所做的事情感到困惑。

这是我的application_controller代码

class ApplicationController < ActionController::API
    include Resaponse
    include ExceptionHandler
    # called before every action on controllers
    before_action :authorize_request
    attr_reader :current_user

    private

    # Check for valid request token and return user
    def authorize_request
        @current_user = (AuthorizeApiRequest.new(request.headers).call)[:user]
    end

end

谢谢!

什么是Resaponseinclude Resaponse 我认为这将是Response ,如果你的文件名是response.rb和类名是Response

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM