diff options
author | Maurizio De Santis <m.desantis@morganspa.com> | 2014-01-23 14:50:29 +0100 |
---|---|---|
committer | Maurizio De Santis <desantis.maurizio@gmail.com> | 2014-01-24 12:41:48 +0100 |
commit | c1f8a0d61409b6c9fa16847b0ecf694cc4d4cecf (patch) | |
tree | 5f59ae676ee1124cacec3f1ffb7308f4c3fbefe4 /actionpack/lib/action_dispatch/routing | |
parent | 6ef0569b0bf6e13d63f6c51790745b2007b92973 (diff) | |
download | rails-c1f8a0d61409b6c9fa16847b0ecf694cc4d4cecf.tar.gz rails-c1f8a0d61409b6c9fa16847b0ecf694cc4d4cecf.tar.bz2 rails-c1f8a0d61409b6c9fa16847b0ecf694cc4d4cecf.zip |
Fix `rake routes` error when `Rails::Engine` with empty routes is mounted; fixes rails/rails#13810
Squash
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-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 |