2 class DiaryCommentsController < ApplicationController
4 include PaginationMethods
8 before_action :authorize_web
9 before_action :set_locale
10 before_action :check_database_readable
14 before_action :lookup_user
16 allow_thirdparty_images
19 @title = t ".title", :user => @user.display_name
21 comments = DiaryComment.where(:user => @user)
22 comments = comments.visible unless can? :unhide, DiaryComment
24 @params = params.permit(:display_name, :before, :after)
26 @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:user])
28 render :partial => "page" if turbo_frame_request_id == "pagination"