Create user comments controller base class
This commit is contained in:
parent
43d60108da
commit
9fbe52dd21
4 changed files with 23 additions and 18 deletions
18
app/controllers/users/comments_controller.rb
Normal file
18
app/controllers/users/comments_controller.rb
Normal 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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue