aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-02-23 17:56:28 -0800
committerCarl Lerche <carllerche@mac.com>2010-02-24 10:52:16 -0800
commitba57575e03647df78f8f2d4b56f1395c10061366 (patch)
tree1ddb0f9d5af5ad4fd6a7acc25b21c23735043cf9 /railties/lib
parent60ca754b97f1254eebd61da08fb2f58f298fec31 (diff)
downloadrails-ba57575e03647df78f8f2d4b56f1395c10061366.tar.gz
rails-ba57575e03647df78f8f2d4b56f1395c10061366.tar.bz2
rails-ba57575e03647df78f8f2d4b56f1395c10061366.zip
Remove references to ActionDispatch::Routing::Routes in favor of Rails.appication.routes.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/tasks/routes.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
index 1d0ac38c96..42e01d5e51 100644
--- a/railties/lib/rails/tasks/routes.rake
+++ b/railties/lib/rails/tasks/routes.rake
@@ -1,9 +1,9 @@
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :routes => :environment do
Rails::Application.reload_routes!
- all_routes = ENV['CONTROLLER'] ? ActionDispatch::Routing::Routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : ActionDispatch::Routing::Routes.routes
+ all_routes = ENV['CONTROLLER'] ? Rails.application.routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : Rails.application.routes.routes
routes = all_routes.collect do |route|
- name = ActionDispatch::Routing::Routes.named_routes.routes.index(route).to_s
+ name = Rails.application.routes.named_routes.routes.index(route).to_s
reqs = route.requirements.empty? ? "" : route.requirements.inspect
{:name => name, :verb => route.verb.to_s, :path => route.path, :reqs => reqs}
end