aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-01-27 22:46:59 +0700
committerPratik Naik <pratiknaik@gmail.com>2010-02-02 09:05:22 +0000
commitab83800c3519595b909b760deb09c6ef46a07274 (patch)
tree806c900652833885d3fcab77706bd4025562fab8 /railties/lib/rails/tasks
parentdf8852d04d030330efcb86f16977b837473bf022 (diff)
downloadrails-ab83800c3519595b909b760deb09c6ef46a07274.tar.gz
rails-ab83800c3519595b909b760deb09c6ef46a07274.tar.bz2
rails-ab83800c3519595b909b760deb09c6ef46a07274.zip
Hide '/rails/info/properties' from 'rake routes' [#3793 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/routes.rake1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
index e8da72db4d..ac0f440896 100644
--- a/railties/lib/rails/tasks/routes.rake
+++ b/railties/lib/rails/tasks/routes.rake
@@ -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