Skip to content

Commit

Permalink
Merge pull request #13608 from opf/bug/47871-appsignal-performance-me…
Browse files Browse the repository at this point in the history
…ssagescontrollershow

 [#47871]  [AppSignal] Performance MessagesController#show
  • Loading branch information
ulferts committed Sep 4, 2023
2 parents d94e6fc + 386325c commit e63baa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def show

@replies = @topic
.children
.includes(:author, :attachments, forum: :project)
.includes(:author, :attachments, :project, forum: :project)
.order(created_at: :asc)
.page(@offset)
.per_page(per_page_param)
Expand Down
6 changes: 4 additions & 2 deletions app/views/messages/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ See COPYRIGHT and LICENSE files for more details.
<div class="wiki op-uc-container">
<%= format_text message, :content, attachments: message.attachments %>
</div>
<% resource = message_attachment_representer(message) %>
<%= list_attachments(resource) %>
<% if message.attachments.any? %>
<% resource = message_attachment_representer(message) %>
<%= list_attachments(resource) %>
<% end %>
</div>
<% end %>
<%= pagination_links_full @replies, per_page_links: false %>
Expand Down

0 comments on commit e63baa2

Please sign in to comment.