0
0
Fork 0

Fix admin UI for accounts somewhat

This commit is contained in:
Eugen Rochko 2017-02-15 00:22:58 +01:00
parent 0a2427f79b
commit 5426f06ac2
5 changed files with 58 additions and 31 deletions

View file

@ -19,19 +19,26 @@ class Admin::AccountsController < ApplicationController
def show; end
def update
if @account.update(account_params)
redirect_to admin_accounts_path
else
render :show
end
end
def suspend
Admin::SuspensionWorker.perform_async(@account.id)
redirect_to admin_accounts_path
end
def unsuspend
@account.update(suspended: false)
redirect_to admin_accounts_path
end
def silence
@account.update(silenced: true)
redirect_to admin_accounts_path
end
def unsilence
@account.update(silenced: false)
redirect_to admin_accounts_path
end
private
def set_account