我做迈克尔·哈特的教程中,我得到的错误:为什么我会得到“未初始化的常量ApplicationController :: SessionsHelper(NameError)”?
rails_projects/sample_app/app/controllers/application_controller.rb:3:in `<class:ApplicationController>': uninitialized constant ApplicationController::SessionsHelper (NameError)
这里是我的application_controller.rb文件:
class ApplicationController < ActionController::Base
protect_from_forgery
include SessionsHelper
# Force signout to prevent CSRF attacks
def handle_unverified_request
sign_out
super
end
end
谢谢。现在我得到了错误:未定义的方法主题为主:对象(NoMethodError) – user2415183
你能接受这个答案,并单独问你的新问题吗? –