Class: StandardId::Web::AccountController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- StandardId::Web::AccountController
- 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
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 11 def edit @account = current_account end |
#show ⇒ Object
6 7 8 9 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 6 def show @account = current_account @sessions = current_account.sessions.active.order(created_at: :desc) end |
#update ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 15 def update @account = current_account if @account.update(account_params) redirect_to account_path, notice: "Account updated successfully" else flash.now[:alert] = @account.errors..join(", ") render :edit, status: :unprocessable_content end end |