I am using rails 3.0.10, in that i had created users using devise and
i followed the below link to change the user password, but it is not
changing the password when i changed the current password. please
anyone help me to get out of this problem
Can you provide info from log file when this action performing ?
+
Check validations in your model and what params you getting in
params[:user]
.
On Jan 24, 8:32am, Kapil K. [email protected]
These are the logs in server
Started POST “/passwords/show” for 127.0.0.1 at 2012-01-24 17:26:46
+0530
Processing by PasswordsController#update as HTML
Parameters: {“utf8”=>“Γ£ô”,
“authenticity_token”=>“Ywh7x8r1DMlPq9277Uca7CoxaeJ
QJVxhXH9AmTR4O1c=”, “user”=>{“current_password”=>"[FILTERED]",
“password”=>"[FIL
TERED]", “password_confirmation”=>"[FILTERED]"}, “commit”=>“Change my
password”,
“id”=>“show”}
←[1m←[36mUser Load (0.0ms)←[0m ←[1mSELECT users
.* FROM users
WHERE users
.id
= 2 LIMIT 1←[0m
←[1m←[35mSQL (0.0ms)←[0m BEGIN
←[1m←[36mSQL (0.0ms)←[0m ←[1mROLLBACK←[0m
Rendered passwords/edit.html.erb within layouts/application (15.6ms)
Ok, since I do not know your controller code, this is pretty much a
shot in the blind, but here it is anyways :
Looking at the passwords/edit.html.erb being rendered at the end I am
guessing that there was some error or exception while changing the
password which was caught and the user was asked to rectify the error.
It is very likely that the error was a validation error. So in your
rescue block (or wherever you are rendering passwords/edit.html.erb)
you can add a log line to tell you what the error is and then fix that
error.
Regards,
Brahmana
@sribrahmana (http://www.twitter.com/@sribrahmana)
On Jan 24, 5:41 pm, Kapil K. [email protected]