提交 ed988eec 编写于 作者: J José Valim

Avoid inspecting the whole route set, closes #1525

上级 06d2d4c4
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
module ActionDispatch module ActionDispatch
module Routing module Routing
class RouteSet #:nodoc: class RouteSet #:nodoc:
# Since the router holds references to many parts of the system
# like engines, controllers and the application itself, inspecting
# the route set can actually be really slow, therefore we default
# alias inspect to to_s.
alias inspect to_s
PARAMETERS_KEY = 'action_dispatch.request.path_parameters' PARAMETERS_KEY = 'action_dispatch.request.path_parameters'
class Dispatcher #:nodoc: class Dispatcher #:nodoc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册