diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-24 04:34:22 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-24 04:34:22 -0800 |
commit | 8efd5fec75b5241d2b25f547bb0d90fd01bbafbd (patch) | |
tree | 0e7d045b801c0481d28711421c23d75eff72346b /actionpack/lib/action_dispatch | |
parent | e61b841a4f5bb9d4d1cd6993ac9cebd53ca1ba32 (diff) | |
parent | c1f8a0d61409b6c9fa16847b0ecf694cc4d4cecf (diff) | |
download | rails-8efd5fec75b5241d2b25f547bb0d90fd01bbafbd.tar.gz rails-8efd5fec75b5241d2b25f547bb0d90fd01bbafbd.tar.bz2 rails-8efd5fec75b5241d2b25f547bb0d90fd01bbafbd.zip |
Merge pull request #13811 from mdesantis/issue-13810
Fixes #13810 `rake routes` error when mount `Rails::Engine` with empty routes
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index f612e91aef..71a0c5e826 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -194,9 +194,9 @@ module ActionDispatch end def widths(routes) - [routes.map { |r| r[:name].length }.max, - routes.map { |r| r[:verb].length }.max, - routes.map { |r| r[:path].length }.max] + [routes.map { |r| r[:name].length }.max || 0, + routes.map { |r| r[:verb].length }.max || 0, + routes.map { |r| r[:path].length }.max || 0] end end |