Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoMethodError: undefined method `confirm!' for #<User

I am trying to create an app using rails app composer tool. I am using Devise with confirmable. I am getting the error

rake db:seed
rake aborted!
NoMethodError: undefined method `confirm!' for #<User:0xa0b26ec>

during the installation process.

Already the user.rb file has :confirmable

  devise :database_authenticatable, :registerable, :confirmable,
     :recoverable, :rememberable, :trackable, :validatable

I am not able to do rake db:seed.

like image 593
Vivek S Avatar asked Dec 01 '22 16:12

Vivek S


1 Answers

The #confirm! method has been removed.

https://github.com/plataformatec/devise/commit/26e22d8e953184b38a87f3a9b935db32258637d5

You have to use an older version or, what's better switch to the #confirm method.

like image 171
Tobias Avatar answered Jan 03 '23 11:01

Tobias