1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Show installed middleware in builtin rails info (/rails/info/properties) [#2396 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
Michael Schuerig 2009-04-02 11:54:52 -05:00 committed by Joshua Peek
parent ea8077c642
commit cad3e8b261
2 changed files with 16 additions and 2 deletions

View file

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

View file

@ -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;