merges master and fixes conflicts

This commit is contained in:
kikito
2015-08-17 17:38:34 +02:00
51 changed files with 579 additions and 60 deletions

View File

@@ -1,6 +1,5 @@
class Admin::BaseController < ApplicationController
layout 'admin'
before_action :authenticate_user!
skip_authorization_check

View 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

View File

@@ -1,5 +1,4 @@
class Admin::DashboardController < Admin::BaseController
layout 'admin'
def index
end

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