Class: Avocado::CredentialsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/avocado/credentials_controller.rb

Constant Summary collapse

UPDATE_PARAMETERS =
%i[password password_confirmation]

Constants inherited from BaseController

BaseController::FINDER_PARAMETERS

Instance Method Summary collapse

Instance Method Details

#editObject



9
10
# File 'app/controllers/avocado/credentials_controller.rb', line 9

def edit
end

#updateObject



12
13
14
15
16
17
18
19
# File 'app/controllers/avocado/credentials_controller.rb', line 12

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