aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorclaudiob <claudiob@gmail.com>2015-11-11 09:46:23 -0800
committerclaudiob <claudiob@gmail.com>2015-11-11 09:46:23 -0800
commit6c75bcbbb71f3fe85e2db3205181efccb056754b (patch)
treeab8bb16c990e74089b7132d24edbb68e6812eb9f /actionpack/lib
parentf94e9a69b09fe63ba722a8e1815d0bd1f3daf3a6 (diff)
downloadrails-6c75bcbbb71f3fe85e2db3205181efccb056754b.tar.gz
rails-6c75bcbbb71f3fe85e2db3205181efccb056754b.tar.bz2
rails-6c75bcbbb71f3fe85e2db3205181efccb056754b.zip
Show middleware classes on /rails/info/properties
Closes #21230 by following the indication of @rafaelfranca: > I think the output change would be simpler. > What is really important to show is the class of the middleware, so we should change the output to show that.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/stack.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb
index 90e2ae6802..44fc1ee736 100644
--- a/actionpack/lib/action_dispatch/middleware/stack.rb
+++ b/actionpack/lib/action_dispatch/middleware/stack.rb
@@ -15,7 +15,11 @@ module ActionDispatch
def name; klass.name; end
def inspect
- klass.to_s
+ if klass.is_a?(Class)
+ klass.to_s
+ else
+ klass.class.to_s
+ end
end
def build(app)