aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-02-23 12:49:18 +0100
committerJosé Valim <jose.valim@gmail.com>2012-02-23 12:49:18 +0100
commited988eece022ae314428d153792aaa26e8749b47 (patch)
tree005a765dcb5e6260aaa3bd7f3a27c726a82d7034 /actionpack/lib
parent06d2d4c40bdc8baa09872df0e6b2a03d0039600f (diff)
downloadrails-ed988eece022ae314428d153792aaa26e8749b47.tar.gz
rails-ed988eece022ae314428d153792aaa26e8749b47.tar.bz2
rails-ed988eece022ae314428d153792aaa26e8749b47.zip
Avoid inspecting the whole route set, closes #1525
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb6
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 b767426de4..57c6972078 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: