Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method 'allow_password_change=' #1046

Closed
hansy opened this issue Dec 15, 2017 · 3 comments
Closed

NoMethodError: undefined method 'allow_password_change=' #1046

hansy opened this issue Dec 15, 2017 · 3 comments

Comments

@hansy
Copy link

hansy commented Dec 15, 2017

Trying to hit the password reset endpoint, but Rails spits this error: NoMethodError: undefined method 'allow_password_change='. It's breaking in the passwords controller.

Do I have to add this method to the model manually? Here's my current User model:

class User < ActiveRecord::Base
  devise :database_authenticatable, 
         :registerable,
         :recoverable, 
         :rememberable, 
         :validatable,
         :confirmable

  include DeviseTokenAuth::Concerns::User
end

Using Version 0.1.43.beta1 (from master branch).

@hansy hansy changed the title NoMethodError: undefined method `allow_password_change=' NoMethodError: undefined method 'allow_password_change=' Dec 15, 2017
@hansy
Copy link
Author

hansy commented Dec 15, 2017

Oh I see. It's not a method; it's an attribute that must not have made it into my schema. Apologies for the confusion.

@hansy hansy closed this as completed Dec 15, 2017
@arnaudcosson
Copy link

@hansy can you please show the code you edit to fix this error?

@hansy
Copy link
Author

hansy commented Apr 5, 2018

@arnaudcosson Add allow_password_change as a boolean attribute to your Devise model in your migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants