mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Hide '/rails/info/properties' from 'rake routes' [#3793 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
parent
df8852d04d
commit
ab83800c35
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ task :routes => :environment do
|
|||
reqs = route.requirements.empty? ? "" : route.requirements.inspect
|
||||
{:name => name, :verb => route.verb.to_s, :path => route.path, :reqs => reqs}
|
||||
end
|
||||
routes.reject!{ |r| r[:path] == "/rails/info/properties" } # skip the route if it's internal info route
|
||||
name_width = routes.collect {|r| r[:name]}.collect {|n| n.length}.max
|
||||
verb_width = routes.collect {|r| r[:verb]}.collect {|v| v.length}.max
|
||||
path_width = routes.collect {|r| r[:path]}.collect {|s| s.length}.max
|
||||
|
|
Loading…
Reference in a new issue