Class: LesliAdmin::AccountsController
- Inherits:
-
ApplicationController
- Object
- Lesli::ApplicationLesliController
- ApplicationController
- LesliAdmin::AccountsController
- Defined in:
- app/controllers/lesli_admin/accounts_controller.rb
Instance Method Summary collapse
-
#show ⇒ Object
GET /accounts/1 GET /accounts/1.json.
-
#update ⇒ Object
PATCH/PUT /accounts/1 PATCH/PUT /accounts/1.json.
Instance Method Details
#show ⇒ Object
GET /accounts/1 GET /accounts/1.json
39 40 41 42 43 44 45 46 |
# File 'app/controllers/lesli_admin/accounts_controller.rb', line 39 def show respond_to do |format| format.html {} format.json do respond_with_successful(AccountService.new(current_user, query).show) end end end |
#update ⇒ Object
PATCH/PUT /accounts/1 PATCH/PUT /accounts/1.json
70 71 72 73 74 75 76 |
# File 'app/controllers/lesli_admin/accounts_controller.rb', line 70 def update if @account.update(account_params) respond_with_successful(@account) else respond_with_error(@account) end end |