0

I am trying to use "has_secure_password" in my Rails project. I have included the bcrypt gem in my Gemfile and ran bundle install. However, when I run the project, I am getting the error below:

NameError in UsersController#index
undefined local variable or method `has_secure_pasword' for #<Class:0x00000004169e38>

User class

class User < ActiveRecord::Base
   has_secure_pasword

   validates :password, length: { minimum: 6 }

end

Any ideas on how to fix this? I have not created any users - could that be the issue?

user3813256
  • 792
  • 1
  • 6
  • 19

1 Answers1

4

undefined local variable or method `has_secure_pasword' for Class:0x00000004169e38

has_secure_pasword should be has_secure_password. You are missing a s in password.

Pavan
  • 33,316
  • 7
  • 50
  • 76