mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00:00
WIP created tests for comments_controller.rb
This commit is contained in:
parent
81c4d1381c
commit
a8815aff5e
3 changed files with 73 additions and 21 deletions
|
|
@ -8,6 +8,8 @@ module Admin
|
|||
@posted_comments = grouped_comments(accessible_ordered_comments.find_comments_by_user(current_user))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def accessible_ordered_comments
|
||||
Comment.accessible_by(current_ability).joins('INNER JOIN events ON commentable_id = events.id').order('events.title', 'comments.created_at DESC')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue