This project is archived and is in readonly mode.

#3405 ✓resolved
Sam Ruby

No API for introspecting routes (AWDwR3, section 21.2)

Reported by Sam Ruby | October 21st, 2009 @ 05:05 PM

Given:

rs = ActionController::Routing::Routes

2.3.4 results:

puts rs.routes

GET    /users(.:format)?                        {:controller=>"users", :action=>"index"}
POST   /users(.:format)?                        {:controller=>"users", :action=>"create"}
GET    /users/new(.:format)?                    {:controller=>"users", :action=>"new"}
...

3.0pre results:

puts rs.routes

 #<Rack::Mount::Route:0x987c630>
 #<Rack::Mount::Route:0x9861f88>
 #<Rack::Mount::Route:0x9852ccc>

...

Comments and changes to this ticket

  • Sam Ruby

    Sam Ruby February 3rd, 2010 @ 12:55 PM

    • State changed from “new” to “resolved”

    Now there is a wealth of information:

    rails/info/properties {:action=>"properties", :controller=>"rails/info"}", @conditions={:path_info=>/\A\/rails\/info\/properties\Z/}, @path="/rails/info/properties", @app=#<ActionDispatch::Routing::RouteSet::Dispatcher:0x7f6f166d10a0 @glob_param=nil>, @requirements={:action=>"properties", :controller=>"rails/info"}, @defaults={:action=>"properties", :controller=>"rails/info"}>]

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Tags

Pages