mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
WIP changed CommentsController#index; temporary view for all_comments
This commit is contained in:
parent
7ba3cfd473
commit
1addae9cd9
6 changed files with 15 additions and 54 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue