From 391f2543c96a9b3de4e44f4ea6aeee2f53ad9e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 3 Feb 2010 18:07:22 +0100 Subject: Properly show middlewares on rake about. --- railties/builtin/rails_info/rails/info.rb | 9 ++++++--- 1 file 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 -- cgit v1.2.3