Skip to content

Commit

Permalink
Scope filter to reduce n+1 queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Dunn committed Sep 20, 2016
1 parent ff54ad8 commit dfc2224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</tr>
</thead>
<tbody>
<% @projects.each do |project| %>
<% @projects.includes(:suites).each do |project| %>
<% project.suites.each_with_index do |suite, i| %>
<tr id="project_<%= project.id %>">
<th><%= project.name %></th>
Expand Down

0 comments on commit dfc2224

Please sign in to comment.