Skip to content

Commit

Permalink
fixing the display part of missing index report
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh committed Oct 26, 2009
1 parent 38c1544 commit d2b0335
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions History.txt
@@ -1,3 +1,7 @@
=== 0.0.21 2009-10-26

* fixed the formatting issue while displaying missing index in diagnostic section

=== 0.0.20 2009-10-22

* warning message if JavaScript is disabled
Expand Down
20 changes: 13 additions & 7 deletions app/views/admin_data/diagnostic/missing_index.html.erb
Expand Up @@ -9,14 +9,20 @@
<%= link_to 'Find missing database index', admin_data_diagnostic_missing_index_url %>
<p>It is recommended that all foreign keys be indexed.</p>
<p>
Given below is the list of table and the foreign keys which do not have any index.
Given below is the migration code that should be performed to create index.
</p>
<% @indexes.each do |table, columns|
columns.map do |column| %>
Table: <%= table %>
Column: <%= column %>
<% end %>
<% end %>
<table>
<% @indexes.each do |table, columns|
columns.map do |column|
%>
<tr>
<td>
add_index '<%=table%>','<%=column%>'
</td>
</tr>
<% end %>
<% end %>
</table>
</div>
</div>
</div>
Expand Down

0 comments on commit d2b0335

Please sign in to comment.