merges master and fixes conflicts
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
class Admin::BaseController < ApplicationController
|
||||
layout 'admin'
|
||||
|
||||
before_action :authenticate_user!
|
||||
|
||||
skip_authorization_check
|
||||
|
||||
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
|
||||
@@ -1,5 +1,4 @@
|
||||
class Admin::DashboardController < Admin::BaseController
|
||||
layout 'admin'
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
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