diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-05 11:52:20 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-05 11:52:20 -0300 |
commit | abf8de85519141496a6773310964ec03f6106f3f (patch) | |
tree | 5149d0c61125567f0e704d2f520611a1718e168a /actionpack | |
parent | 5c078368c762ec025997af6b2c94632b2f9301d2 (diff) | |
download | rails-abf8de85519141496a6773310964ec03f6106f3f.tar.gz rails-abf8de85519141496a6773310964ec03f6106f3f.tar.bz2 rails-abf8de85519141496a6773310964ec03f6106f3f.zip |
Use flat_map { } instead of map {}.flatten
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index c18dc94d4f..178e2074bc 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -102,9 +102,9 @@ module ActionDispatch end def formatted_routes_for_engines - @engines.map do |name, routes| + @engines.flat_map do |name, routes| ["\nRoutes for #{name}:"] + formatted_routes(routes) - end.flatten + end end def formatted_routes(routes) |