diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
commit | cf6e025a4538e488ed35f61f1f7f3498833a34e6 (patch) | |
tree | 6a28d5beac35e74a33243668baf7a9a60edf6724 /railties/builtin/rails_info | |
parent | 628110d7eeb446fee7f9e043f113c083d24883c1 (diff) | |
parent | 195fadbfd31294d43634afb7bbf4f0ffc86b470a (diff) | |
download | rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.gz rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.bz2 rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'railties/builtin/rails_info')
-rw-r--r-- | railties/builtin/rails_info/rails/info.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb index 0dd1c090c1..fdacc469f5 100644 --- a/railties/builtin/rails_info/rails/info.rb +++ b/railties/builtin/rails_info/rails/info.rb @@ -1,9 +1,13 @@ +require "active_support/core_ext/object/misc" +require "cgi" +require "active_support/core_ext/cgi" + module Rails module Info mattr_accessor :properties class << (@@properties = []) def names - map &:first + map {|val| val.first } end def value_for(property_name) @@ -53,7 +57,7 @@ module Rails alias inspect to_s def to_html - returning table = '<table>' do + (table = '<table>').tap do properties.each do |(name, value)| table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>) formatted_value = if value.kind_of?(Array) @@ -108,7 +112,7 @@ module Rails end property 'Middleware' do - ActionController::Dispatcher.middleware.active.map(&:inspect) + ActionController::Dispatcher.middleware.active.map {|middle| middle.inspect } end # The Rails Git revision, if it's checked out into vendor/rails. |