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 'password_length' for #<Class:0x000055c3f5335fe0> #851

Closed
davidwessman opened this issue Apr 14, 2021 · 3 comments

Comments

@davidwessman
Copy link

Hello!

Versions:

  • devise 4.7.3
  • devise_invitable 2.0.4
inviter = User.first
User.invite!({email: "email@test.com"}, inviter) 
=> NoMethodError: undefined method 'password_length' for #<Class:0x000055c3f5335fe0>

I notice this is only called in the code introduced in 2.0.4 in lib/devise_invitable/models.rb.

Is this a bug in the gem or do I need to update how I use it somehow?

User.first.password_length => NoMethodError
User.password_length => NoMethodError
Devise.password_length => 6..128
@scambra
Copy link
Owner

scambra commented Apr 14, 2021

Same as #850
do you have validatable in your user model?

@davidwessman
Copy link
Author

Same as #850
do you have validatable in your user model?

No, I do not have :validatable

@scambra
Copy link
Owner

scambra commented Apr 19, 2021

Fixed in #850

@scambra scambra closed this as completed Apr 19, 2021
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