adds pending filter to admin/comments

This commit is contained in:
Juanjo Bazán
2015-09-06 21:45:41 +02:00
parent 1a7806150a
commit bc90812d37
5 changed files with 21 additions and 9 deletions

View File

@@ -1,10 +1,10 @@
class Admin::CommentsController < Admin::BaseController
has_filters %w{all with_confirmed_hide}
has_filters %w{without_confirmed_hide all with_confirmed_hide}
before_action :load_comment, only: [:confirm_hide, :restore]
def index
@comments = Comment.only_hidden.send(@current_filter).page(params[:page])
@comments = Comment.only_hidden.send(@current_filter).order(hidden_at: :desc).page(params[:page])
end
def confirm_hide