Class: LesliAdmin::AccountsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lesli_admin/accounts_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject

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

#updateObject

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()
        respond_with_successful(@account)
    else
        respond_with_error(@account)
    end
end