1
0
Fork 0
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:
Prem Sichanugrist 2010-01-27 22:46:59 +07:00 committed by Pratik Naik
parent df8852d04d
commit ab83800c35

View file

@ -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