aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Schuerig <michael@schuerig.de>2009-04-02 11:54:52 -0500
committerJoshua Peek <josh@joshpeek.com>2009-04-02 11:54:52 -0500
commitcad3e8b261a8d9551bc19a57007acf574d957548 (patch)
tree07d5b5030846b51315796eeef1f705516945500b
parentea8077c6427d208188f9cd11f88ebdc8f60dec28 (diff)
downloadrails-cad3e8b261a8d9551bc19a57007acf574d957548.tar.gz
rails-cad3e8b261a8d9551bc19a57007acf574d957548.tar.bz2
rails-cad3e8b261a8d9551bc19a57007acf574d957548.zip
Show installed middleware in builtin rails info (/rails/info/properties) [#2396 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
-rw-r--r--railties/builtin/rails_info/rails/info.rb11
-rw-r--r--railties/html/index.html7
2 files changed, 16 insertions, 2 deletions
diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb
index a20d9bfe62..0dd1c090c1 100644
--- a/railties/builtin/rails_info/rails/info.rb
+++ b/railties/builtin/rails_info/rails/info.rb
@@ -56,7 +56,12 @@ module Rails
returning table = '<table>' do
properties.each do |(name, value)|
table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
- table << %(<td class="value">#{CGI.escapeHTML(value.to_s)}</td></tr>)
+ formatted_value = if value.kind_of?(Array)
+ "<ul>" + value.map { |v| "<li>#{CGI.escapeHTML(v.to_s)}</li>" }.join + "</ul>"
+ else
+ CGI.escapeHTML(value.to_s)
+ end
+ table << %(<td class="value">#{formatted_value}</td></tr>)
end
table << '</table>'
end
@@ -102,6 +107,10 @@ module Rails
end
end
+ property 'Middleware' do
+ ActionController::Dispatcher.middleware.active.map(&:inspect)
+ end
+
# The Rails Git revision, if it's checked out into vendor/rails.
property 'Edge Rails revision' do
edge_rails_revision
diff --git a/railties/html/index.html b/railties/html/index.html
index 0dd5189fb7..cd337dc74c 100644
--- a/railties/html/index.html
+++ b/railties/html/index.html
@@ -99,7 +99,12 @@
}
#about-content td.name {color: #555}
#about-content td.value {color: #000}
-
+
+ #about-content ul {
+ padding: 0;
+ list-style-type: none;
+ }
+
#about-content.failure {
background-color: #fcc;
border: 1px solid #f00;