Permalink
Browse files

Avoid inspecting the whole route set, closes #1525

  • Loading branch information...
1 parent e95f8e8 commit bef0b354e49b67b0953f5c6e83a6f54fc812fef5 @josevalim josevalim committed with drogus Feb 23, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -8,6 +8,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 bef0b35

Please sign in to comment.