Undefined local variable or method `unconfirmed_email' when registering users?

前端 未结 2 1943
别跟我提以往
别跟我提以往 2020-12-24 00:32

I just installed Devise in my app, configured the views and everything. However, when I click the sign up button I get this error:

NameError in Devise::Regis         


        
相关标签:
2条回答
  • 2020-12-24 00:50

    You miss unconfirmed_email column in db.

    add t.reconfirmable in migrations and run rake db:migrate

    or if you're using devise >= 2.0

    t.string   :unconfirmed_email
    
    0 讨论(0)
  • 2020-12-24 01:06

    unconfirmed_email is required for reconfirmable. For some reason this was enabled by default in config/intializers/devise.rb:

    config.reconfirmable = true
    

    All you have to do is set this to false.

    0 讨论(0)
提交回复
热议问题