From 6b7f64451e86b1467743cbbddebabd1fd6a95466 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 21 Jan 2025 19:03:03 +0000 Subject: [PATCH] Preload parent objects for user comments --- app/controllers/users/changeset_comments_controller.rb | 2 +- app/controllers/users/diary_comments_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users/changeset_comments_controller.rb b/app/controllers/users/changeset_comments_controller.rb index 2b8b367fe..a690e7c4a 100644 --- a/app/controllers/users/changeset_comments_controller.rb +++ b/app/controllers/users/changeset_comments_controller.rb @@ -8,7 +8,7 @@ module Users @params = params.permit(:display_name, :before, :after) - @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:author]) + @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:author, :changeset]) end end end diff --git a/app/controllers/users/diary_comments_controller.rb b/app/controllers/users/diary_comments_controller.rb index 8f41e509f..4737ec007 100644 --- a/app/controllers/users/diary_comments_controller.rb +++ b/app/controllers/users/diary_comments_controller.rb @@ -8,7 +8,7 @@ module Users @params = params.permit(:display_name, :before, :after) - @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:user]) + @comments, @newer_comments_id, @older_comments_id = get_page_items(comments, :includes => [:user, :diary_entry]) render :partial => "page" if turbo_frame_request_id == "pagination" end -- 2.39.5