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

varatis picture varatis · Jan 28, 2012 · Viewed 30.2k times · Source

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::RegistrationsController#create
undefined local variable or method `unconfirmed_email' for #<User:0x00000103721b28>

Why is this? Also, I'm using tlsmail to send emails out through my gmail business account. This might be a problem as well.

Answer

varatis picture varatis · Jan 29, 2012

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.