mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
WIP created tests for comments_controller.rb
This commit is contained in:
parent
208478ff2d
commit
a9a43d726f
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