Class: StandardId::Web::AccountController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- StandardId::Web::AccountController
- Defined in:
- app/controllers/standard_id/web/account_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
9 10 11 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 9 def edit @account = current_account end |
#show ⇒ Object
4 5 6 7 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 4 def show @account = current_account @sessions = current_account.sessions.active.order(created_at: :desc) end |
#update ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/standard_id/web/account_controller.rb', line 13 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 |