我做邁克爾·哈特的教程中,我得到的錯誤:爲什麼我會得到「未初始化的常量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
你能接受這個答案,並單獨問你的新問題嗎? –