method
routes
v6.0.0 -
Show latest stable
- Class:
Rails::InfoController
routes()public
No documentation available.
# File railties/lib/rails/info_controller.rb, line 21
def routes
if path = params[:path]
path = URI.parser.escape path
normalized_path = with_leading_slash path
render json: {
exact: match_route { |it| it.match normalized_path },
fuzzy: match_route { |it| it.spec.to_s.match path }
}
else
@routes_inspector = ActionDispatch::Routing::RoutesInspector.new(_routes.routes)
@page_title = "Routes"
end
end