Class: PasswordsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/passwords_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject

From for user to update password



11
12
13
# File 'app/controllers/passwords_controller.rb', line 11

def edit
  # edit.html.erb
end

#updateObject

Update user’s password



16
17
18
19
20
21
22
# File 'app/controllers/passwords_controller.rb', line 16

def update
  if user.update(password_params)
    redirect_to new_session_path, notice: t(".notice")
  else
    render :edit, status: :unprocessable_entity
  end
end