adds moderation to comments and debates [#136]
This commit is contained in:
16
app/controllers/admin/debates_controller.rb
Normal file
16
app/controllers/admin/debates_controller.rb
Normal 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
|
||||
Reference in New Issue
Block a user