Class: StandardId::Web::AccountController

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

Instance Method Summary collapse

Instance Method Details

#editObject



9
10
11
# File 'app/controllers/standard_id/web/account_controller.rb', line 9

def edit
  @account = 
end

#showObject



4
5
6
7
# File 'app/controllers/standard_id/web/account_controller.rb', line 4

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

#updateObject



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

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