Create user comments controller base class

This commit is contained in:
Anton Khorev 2025-01-19 03:30:18 +03:00
parent 43d60108da
commit 9fbe52dd21
4 changed files with 23 additions and 18 deletions

View file

@ -0,0 +1,18 @@
module Users
class CommentsController < ApplicationController
include UserMethods
include PaginationMethods
layout "site"
before_action :authorize_web
before_action :set_locale
before_action :check_database_readable
authorize_resource
before_action :lookup_user
allow_thirdparty_images
end
end

View file

@ -1,20 +1,5 @@
module Users
class DiaryCommentsController < ApplicationController
include UserMethods
include PaginationMethods
layout "site"
before_action :authorize_web
before_action :set_locale
before_action :check_database_readable
authorize_resource
before_action :lookup_user
allow_thirdparty_images
class DiaryCommentsController < CommentsController
def index
@title = t ".title", :user => @user.display_name