adds moderation to comments and debates [#136]
This commit is contained in:
13
app/controllers/admin/comments_controller.rb
Normal file
13
app/controllers/admin/comments_controller.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Admin::CommentsController < Admin::BaseController
|
||||
|
||||
def index
|
||||
@comments = Comment.only_hidden
|
||||
end
|
||||
|
||||
def restore
|
||||
@comment = Comment.with_hidden.find(params[:id])
|
||||
@comment.restore
|
||||
redirect_to admin_comments_path, notice: t('admin.comments.restore.success')
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user