diff options
author | José Valim <jose.valim@gmail.com> | 2012-02-23 12:49:18 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-02-23 12:50:49 +0100 |
commit | 419040f203f5c7864fa692459aa3284368c48d50 (patch) | |
tree | c4cbbee0dc809497b6d295303bbb8d068470ff89 /actionpack/lib/action_dispatch | |
parent | c5c3274b65cfac4eb9f4c282b0b3d730bf9af596 (diff) | |
download | rails-419040f203f5c7864fa692459aa3284368c48d50.tar.gz rails-419040f203f5c7864fa692459aa3284368c48d50.tar.bz2 rails-419040f203f5c7864fa692459aa3284368c48d50.zip |
Avoid inspecting the whole route set, closes #1525
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index a78e1e13b0..8e7c997dc6 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -9,6 +9,12 @@ require 'action_controller/metal/exceptions' module ActionDispatch module Routing 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' class Dispatcher #:nodoc: |