Class: StandardId::Web::AccountController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/standard_id/web/account_controller.rb

Constant Summary

Constants included from RateLimitHandling

RateLimitHandling::RATE_LIMIT_STORE

Instance Method Summary collapse

Methods included from StandardId::WebAuthentication

#current_account, #current_scope_names, #current_session, #revoke_current_session!

Methods included from ControllerPolicy

all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!

Instance Method Details

#editObject



11
12
13
# File 'app/controllers/standard_id/web/account_controller.rb', line 11

def edit
  @account = 
end

#showObject



6
7
8
9
# File 'app/controllers/standard_id/web/account_controller.rb', line 6

def show
  @account = 
  @sessions = .sessions.active.order(created_at: :desc)
end

#updateObject



15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/standard_id/web/account_controller.rb', line 15

def update
  @account = 

  if @account.update()
    redirect_to , notice: "Account updated successfully"
  else
    flash.now[:alert] = @account.errors.full_messages.join(", ")
    render :edit, status: :unprocessable_content
  end
end