From 10c3fd2cf78c2a7822ba53152ecaca4930c09cd1 Mon Sep 17 00:00:00 2001 From: nicolas-entourage <75681929+nicolas-entourage@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:09:18 +0100 Subject: [PATCH] EN-7917 use denorms to avoid n+1 --- app/views/admin/neighborhoods/show_outings.html.erb | 2 +- app/views/admin/neighborhoods/show_posts.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/neighborhoods/show_outings.html.erb b/app/views/admin/neighborhoods/show_outings.html.erb index 60949e37c..609adcdb2 100644 --- a/app/views/admin/neighborhoods/show_outings.html.erb +++ b/app/views/admin/neighborhoods/show_outings.html.erb @@ -24,7 +24,7 @@ <%= image_tag(outing.image_url, size: '225x96') if outing.image_url.present? %> - <% if outing.parent_chat_messages.any? %> + <% if outing.number_of_root_chat_messages > 0 %>