Skip to content

Commit

Permalink
EN-7917 use denorms to avoid n+1
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-entourage committed Jan 9, 2025
1 parent e9449f0 commit 10c3fd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/neighborhoods/show_outings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<%= image_tag(outing.image_url, size: '225x96') if outing.image_url.present? %>
</div>

<% if outing.parent_chat_messages.any? %>
<% if outing.number_of_root_chat_messages > 0 %>
<div><%= link_to "voir les messages", show_outing_posts_admin_neighborhood_path(@neighborhood, outing_id: outing.id) %></div>
<% end %>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/neighborhoods/show_posts.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<div id="chat-message-image-<%= message.id %>" hidden="hidden"></div>
<% end %>

<% if message.children.any? %>
<% if message.comments_count > 0 %>
<div><%= link_to "voir les commentaires", show_post_comments_admin_neighborhood_path(@neighborhood, post_id: message.id) %></div>
<% end %>
</div>
Expand All @@ -118,7 +118,7 @@
method: :post %>
</li>

<% unless message.children.any? %>
<% unless message.comments_count > 0 %>
<li>
<%= link_to "Ajouter un commentaire", show_post_comments_admin_neighborhood_path(@neighborhood, post_id: message.id) %>
</li>
Expand Down

0 comments on commit 10c3fd2

Please sign in to comment.