diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/routes.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/journey/routes.rb b/actionpack/lib/action_dispatch/journey/routes.rb index eba43c3c36..dacb0ccf48 100644 --- a/actionpack/lib/action_dispatch/journey/routes.rb +++ b/actionpack/lib/action_dispatch/journey/routes.rb @@ -62,13 +62,7 @@ module ActionDispatch end end - MyMapping = Struct.new(:application, :path, :conditions, :required_defaults, :defaults) - - def add_route(app, path, conditions, required_defaults, defaults, name = nil) - add_route2(name, MyMapping.new(app, path, conditions, required_defaults, defaults)) - end - - def add_route2(name, mapping) + def add_route(name, mapping) route = Route.new(name, mapping.application, mapping.path, diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 23dd865ed0..4f698c84ab 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -525,7 +525,7 @@ module ActionDispatch "http://guides.rubyonrails.org/routing.html#restricting-the-routes-created" end - route = @set.add_route2(name, mapping) + route = @set.add_route(name, mapping) named_routes[name] = route if name route end |