mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 04:34:03 +00:00
added test file for comments_controller WIP
This commit is contained in:
parent
e5c235ac32
commit
d365d5efa1
3 changed files with 35 additions and 3 deletions
|
|
@ -12,8 +12,8 @@ module Admin
|
|||
Comment.accessible_by(current_ability).joins('INNER JOIN events ON commentable_id = events.id').order('events.title', 'comments.created_at DESC')
|
||||
end
|
||||
|
||||
def grouped_comments(comments)
|
||||
comments.group_by{ |comment| comment.commentable.conference }.map {|conference, comments| [conference, comments.group_by{|comment| comment.commentable}]}.to_h
|
||||
def grouped_comments(remarks)
|
||||
remarks.group_by{ |comment| comment.commentable.conference }.map {|conference, comments| [conference, comments.group_by{|comment| comment.commentable}]}.to_h
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue