Ruby on rails - Helper method - undefined method `log_in' in Ruby on rails

前端 未结 1 1751
别那么骄傲
别那么骄傲 2021-01-24 06:19

I am implementing login based on Michael Hartl\'s Ruby on Rails Tutorial 3rd Edition. Stuck in chapter 8.

Defining a new log_in helper function in Ses

相关标签:
1条回答
  • 2021-01-24 06:45

    You are missing the ApplicationController part here which includes the helper in the controller so its methods can be accessible directly:

    class ApplicationController < ActionController::Base
      protect_from_forgery with: :exception
      include SessionsHelper
    end
    
    0 讨论(0)
提交回复
热议问题