There is a user model with my name, email, password and bio.
I have to do this two kinds of edit type
a) If the update_attributes fails in updates
the method, Instead of just b) How do I change b) code> should work. In addition, I will change my change_password paths in such a way: After which there is a more rail-way to do things, you can change edit , presenting the correct page is my current update method.
def update @ user.update_attributes (params [: user]) Flash [: success] = "profile updated" sign_in @user redirect_to @user else render 'edit' end '
/ users / 1 / edit to change_password method? So I need something like
/ users / 1 / change_password .
matches' / users /: id / change_password ', for:' user #
redirect_to edit_user_path (@user)
Resources: Users subscribe 'change_password' end of the end
redirect_to - password_password_user_path (@user)
Comments
Post a Comment