Reputation: 41
I've set up a scaffold for a hypothetical application with a users log in, but run into the following error when I try to create a user using the view
undefined method `encrypted_password=' for #<User:0x007fdffb0303a8>
Upvotes: 1
Views: 1446
Reputation: 412
Be sure to have password and passord_confirmation as accessible attributes in your User model like this:
attr_accessible :email, :password, :password_confirmation, etc...
Upvotes: 0
Reputation: 14740
I agree with Sergio. But just to elaborate, follow the instructions below since it seems you may be new to Devise.
Did you do
gem install devise
rails generate devise:install
rails generate devise User
rake db:migrate
rails generate devise:views
?
The full instructions can be found here.
Upvotes: 3
Reputation: 230286
You probably forgot to run migrations against your database after you have installed devise. Or there was no such column in the migration.
Upvotes: 1