WIP changed CommentsController#index; temporary view for all_comments

This commit is contained in:
raluka 2015-09-07 18:56:26 +02:00
parent 7ba3cfd473
commit 1addae9cd9
6 changed files with 15 additions and 54 deletions

View file

@ -3,7 +3,8 @@ module Admin
load_and_authorize_resource
def index
@conferences_available = Conference.with_roles([:admin, :organizer, :cfp], current_user)
@comments = Comment.accessible_by(current_ability).order(created_at: :desc).group_by { |comment| comment.commentable.conference }
@another_comments = Hash[@comments.map{|conference, comments| [conference, comments.group_by {|comment| comment.commentable}]}]
end
end
end