I’ve been googling a lot about it and can’t find the solution.
I have a form to edit a user, but I need to two fields to update or
change their password: New Password / Confirm Password fiels.
I know you can reset your password by clicking the Forgot My Password
link. But I want them to be able to login to their account profile and
change their password while logged in.
How can I do that?
I’m thinking about hacking the Forgot My Password form, haha, I’ll see
if I can make it work like that.
I just found a page that is already built on Devise but it redirects me
to the root when I try to access it. Is there a reason for this? The
user that is trying to access that page has can :manage, :all
Try typing rake routes in your project folder (in Terminal). You
should see all the various routes explained for you. Depending on the
combination of modules you have enabled in Devise, this route users/
password/edit may mean something specific. See which controller and
which action it is hitting in that controller. This may be the page
you see when confirming your account, and you never see it again. You
can certainly change your password under Devise, but you may need to
add a users_controller of your own to access that.
Edit password feature is from Recoverable module, for instance, when
the user does not remember it’s password, he follows a “forgot
password” link, gets a token by email, and then with this token he
will be able to access this password/edit url to edit his password.
If you want users to change their info, you can use the Registerable
module or handle it by yourself =).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.