Permalink
Browse files

Avoid inspecting the whole route set, closes #1525

  • Loading branch information...
1 parent c5c3274 commit 419040f203f5c7864fa692459aa3284368c48d50 @josevalim josevalim committed Feb 23, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -9,6 +9,12 @@
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:

0 comments on commit 419040f

Please sign in to comment.