diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-24 18:08:54 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-24 18:08:54 -0500 |
commit | a840c8afbf4e30b7bd9979e8cd70192c65be7a43 (patch) | |
tree | 82ca10172b498a604c051576f51e113eefe9a574 /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | a0049a6b429c6de46537cc31bf7b3ca48b4c1b2c (diff) | |
download | rails-a840c8afbf4e30b7bd9979e8cd70192c65be7a43.tar.gz rails-a840c8afbf4e30b7bd9979e8cd70192c65be7a43.tar.bz2 rails-a840c8afbf4e30b7bd9979e8cd70192c65be7a43.zip |
Restore `rake routes` [#3402 state:resolved]
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 90d7c208a5..93617e826d 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -47,11 +47,6 @@ module ActionDispatch end end - module RouteExtensions - def segment_keys - conditions[:path_info].names.compact.map { |key| key.to_sym } - end - end # A NamedRouteCollection instance is a collection of named routes, and also # maintains an anonymous module that can be used to install helpers for the @@ -290,9 +285,9 @@ module ActionDispatch routes_changed_at end - def add_route(app, conditions = {}, defaults = {}, name = nil) - route = @set.add_route(app, conditions, defaults, name) - route.extend(RouteExtensions) + def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil) + route = Route.new(app, conditions, requirements, defaults, name) + @set.add_route(*route) named_routes[name] = route if name routes << route route |