[英]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
谢谢!
什么是Resaponse
在include Resaponse
? 我认为这将是Response
,如果你的文件名是response.rb
和类名是Response
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.