adds moderation to comments and debates [#136]

This commit is contained in:
rgarcia
2015-08-17 13:39:31 +02:00
parent cd0a64ea3e
commit f31ed2940d
35 changed files with 315 additions and 45 deletions

View File

@@ -0,0 +1,16 @@
class Admin::DebatesController < Admin::BaseController
def index
@debates = Debate.only_hidden
end
def show
@debate = Debate.with_hidden.find(params[:id])
end
def restore
@debate = Debate.with_hidden.find(params[:id])
@debate.restore
redirect_to admin_debates_path, notice: t('admin.debates.restore.success')
end
end