Yep, the route definitions are very accessible. The following code should get you the list of routes for a specific controller:
rts = ActionController::Routing::Routes.routes.reject do |rt|
rt.defaults[:controller] != "users" || !rt.significant_keys.index(:id)
end
You can run the following code in the console to see the routes:
rts = ActionController::Routing::Routes.routes.reject do |rt|
rt.defaults[:controller] != "users" || !rt.significant_keys.index(:id)
end; nil
rts.each do |rt|
puts "Route: #{rt.segments}"
end; nil
The segments are actually broken out into an array also, which means it should be easy to further filter the list to only routes that require a user id.