problems with password field and devise in account update

I am using the devise gem and my set up is similar to what you had in the etsy demo but a bit more extended. I have included this gist with the relevant files. When i try and leave the edit user page it is giving me the following error no matter if i have input the password in the password filed or not? 1 error prohibited this user from being saved: Current password can't be blank https://gist.github.com/Em01/1713e3d0e536fd3b8bd3

Posted about 5 years ago by Emma
Posted about 5 years ago by Emma

it worked upon restarting the server with this
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :current_password)

0
Posted about 5 years ago by Emma

Do you mean that the account update should look more like this as its still not working
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :current_password)

0
Posted about 5 years ago by Alex Yang

You need to make sure to add relevant fields like ':email' and ':password' to your Application Controller file, under configure_permitted_parameters. Check out videos like the below for more information:

https://baserails.com/courses/etsydemo/add-names-to-users
https://baserails.com/courses/yelpdemo/add-user-fields

0
Posted about 5 years ago by Emma

this is the error in my terminal

Processing by Devise::RegistrationsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"DVVUgIGna8TZwJTBU/ghNT7PTcO/CERC0JXUUQWOW/o=", "user"=>{"name"=>"Emma", "email"=>"n@m.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "current_password"=>"[FILTERED]", "line1"=>"", "line2"=>"", "town"=>"", "county"=>"", "postcode"=>"", "organization"=>""}, "commit"=>"Update"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 21 ORDER BY "users"."id" ASC LIMIT 1
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 21]]
Unpermitted parameters: email, password, password_confirmation, current_password, organization

0