aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-03 18:07:22 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-03 18:07:22 +0100
commit391f2543c96a9b3de4e44f4ea6aeee2f53ad9e5c (patch)
treecd96af42c88ea7b7835e76a84e6007ccf3001720
parent622e3dda849d797fec0d2fcbedd00fe67eb49e8c (diff)
downloadrails-391f2543c96a9b3de4e44f4ea6aeee2f53ad9e5c.tar.gz
rails-391f2543c96a9b3de4e44f4ea6aeee2f53ad9e5c.tar.bz2
rails-391f2543c96a9b3de4e44f4ea6aeee2f53ad9e5c.zip
Properly show middlewares on rake about.
-rw-r--r--railties/builtin/rails_info/rails/info.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb
index 90c9015fcf..5a496f6536 100644
--- a/railties/builtin/rails_info/rails/info.rb
+++ b/railties/builtin/rails_info/rails/info.rb
@@ -51,9 +51,12 @@ module Rails
def to_s
column_width = properties.names.map {|name| name.length}.max
- ["About your application's environment", *properties.map do |property|
- "%-#{column_width}s %s" % property
- end] * "\n"
+ info = properties.map do |name, value|
+ value = value.join(", ") if value.is_a?(Array)
+ "%-#{column_width}s %s" % [name, value]
+ end
+ info.unshift "About your application's environment"
+ info * "\n"
end
alias inspect to_s