Skip to content

Commit

Permalink
Avoid N+1s when listing subscription line items in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
nirebu committed Jan 3, 2023
1 parent 17da0ea commit b1da743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/spree/admin/subscriptions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<td><%= subscription.interval.inspect %></td>
<td><%= render 'state_pill', subscription: subscription %></td>
<td><%= render 'processing_state_pill', subscription: subscription %></td>
<td><%= subscription.line_items.map { |line_item| line_item.subscribable&.name }.join(", ") %></td>
<td><%= subscription.line_items.includes(subscribable: :product).map { |line_item| line_item.subscribable&.name }.join(", ") %></td>
<td class="actions">
<% if subscription.state_events.include?(:cancel) %>
<%=
Expand Down

0 comments on commit b1da743

Please sign in to comment.