]> git.openstreetmap.org Git - rails.git/blob - app/controllers/users/diary_comments_controller.rb
Merge remote-tracking branch 'upstream/pull/5575'
[rails.git] / app / controllers / users / diary_comments_controller.rb
1 module Users
2   class DiaryCommentsController < CommentsController
3     def index
4       @title = t ".title", :user => @user.display_name
5
6       comments = DiaryComment.where(:user => @user)
7       comments = comments.visible unless can? :unhide, DiaryComment
8
9       @params = params.permit(:display_name, :before, :after)
10
11       @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:user, :diary_entry])
12
13       render :partial => "page" if turbo_frame_request_id == "pagination"
14     end
15   end
16 end