1 class DiaryCommentsController < ApplicationController
3 include PaginationMethods
7 before_action :authorize_web
8 before_action :set_locale
9 before_action :check_database_readable
13 before_action :lookup_user, :only => :index
15 allow_thirdparty_images :only => :index
18 @title = t ".title", :user => @user.display_name
20 comments = DiaryComment.where(:user => @user)
21 comments = comments.visible unless can? :unhidecomment, DiaryEntry
23 @params = params.permit(:display_name, :before, :after)
25 @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:user])