From d2b03357df0b6e53a887b0fb26c382b523dbca6e Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Mon, 26 Oct 2009 10:50:27 -0400 Subject: [PATCH] fixing the display part of missing index report --- History.txt | 4 ++++ .../diagnostic/missing_index.html.erb | 20 ++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/History.txt b/History.txt index 4b21e5c..49479b0 100644 --- a/History.txt +++ b/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 diff --git a/app/views/admin_data/diagnostic/missing_index.html.erb b/app/views/admin_data/diagnostic/missing_index.html.erb index c40b764..14c81b8 100644 --- a/app/views/admin_data/diagnostic/missing_index.html.erb +++ b/app/views/admin_data/diagnostic/missing_index.html.erb @@ -9,14 +9,20 @@ <%= link_to 'Find missing database index', admin_data_diagnostic_missing_index_url %>

It is recommended that all foreign keys be indexed.

- 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.

- <% @indexes.each do |table, columns| - columns.map do |column| %> - Table: <%= table %> - Column: <%= column %> - <% end %> - <% end %> + + <% @indexes.each do |table, columns| + columns.map do |column| + %> + + + + <% end %> + <% end %> +
+ add_index '<%=table%>','<%=column%>' +