diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-21 09:07:57 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-11-21 09:07:57 -0800 |
commit | 941516f2252bef8850cbfd59a211134172178269 (patch) | |
tree | ea79f206feae3267325aed0022a56f996376fda3 /actionpack/lib | |
parent | 7ae22cda3f121656439a4fadf12153197fae2036 (diff) | |
parent | 6701b4cf41f6f3d9cfc6a93715acbf852d1e468e (diff) | |
download | rails-941516f2252bef8850cbfd59a211134172178269.tar.gz rails-941516f2252bef8850cbfd59a211134172178269.tar.bz2 rails-941516f2252bef8850cbfd59a211134172178269.zip |
Merge pull request #12975 from sbagdat/fix-for-rake-routes
Fix for routes task
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index cffb814e1e..120bc54333 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -179,7 +179,8 @@ module ActionDispatch private def draw_section(routes) - name_width, verb_width, path_width = widths(routes) + header_lengths = ['Prefix', 'Verb', 'URI Pattern'].map(&:length) + name_width, verb_width, path_width = widths(routes).zip(header_lengths).map(&:max) routes.map do |r| "#{r[:name].rjust(name_width)} #{r[:verb].ljust(verb_width)} #{r[:path].ljust(path_width)} #{r[:reqs]}" |