Create changeset_comments resources for users
This commit is contained in:
parent
9fbe52dd21
commit
420d9da1f9
7 changed files with 91 additions and 1 deletions
14
app/controllers/users/changeset_comments_controller.rb
Normal file
14
app/controllers/users/changeset_comments_controller.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
module Users
|
||||
class ChangesetCommentsController < CommentsController
|
||||
def index
|
||||
@title = t ".title", :user => @user.display_name
|
||||
|
||||
comments = ChangesetComment.where(:author => @user)
|
||||
comments = comments.visible unless current_user&.moderator?
|
||||
|
||||
@params = params.permit(:display_name, :before, :after)
|
||||
|
||||
@comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:author])
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue