Class: ReviseAuth::PasswordController

Inherits:
ReviseAuthController show all
Defined in:
app/controllers/revise_auth/password_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



4
5
6
7
8
9
10
11
# File 'app/controllers/revise_auth/password_controller.rb', line 4

def update
  if current_user.update(password_params)
    redirect_to profile_path, notice: t(".password_changed")
  else
    flash[:alert] = t(".incorrect_password")
    render "revise_auth/registrations/edit", status: :unprocessable_entity
  end
end