From 01c9f99c5370031fcce32931d45b4ca3070cbb3d Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 23 Nov 2009 19:17:53 -0600 Subject: Kill dead routing internals helpers --- actionpack/lib/action_dispatch/routing.rb | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 016cf62ce7..751dbb88d3 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -264,11 +264,8 @@ module ActionDispatch autoload :RouteSet, 'action_dispatch/routing/route_set' SEPARATORS = %w( / . ? ) - HTTP_METHODS = [:get, :head, :post, :put, :delete, :options] - ALLOWED_REQUIREMENTS_FOR_OPTIMISATION = [:controller, :action].to_set - # The root paths which may contain controller files mattr_accessor :controller_paths self.controller_paths = [] @@ -342,29 +339,6 @@ module ActionDispatch def use_controllers!(controller_names) @possible_controllers = controller_names end - - # Returns a controller path for a new +controller+ based on a +previous+ controller path. - # Handles 4 scenarios: - # - # * stay in the previous controller: - # controller_relative_to( nil, "groups/discussion" ) # => "groups/discussion" - # - # * stay in the previous namespace: - # controller_relative_to( "posts", "groups/discussion" ) # => "groups/posts" - # - # * forced move to the root namespace: - # controller_relative_to( "/posts", "groups/discussion" ) # => "posts" - # - # * previous namespace is root: - # controller_relative_to( "posts", "anything_with_no_slashes" ) # =>"posts" - # - def controller_relative_to(controller, previous) - if controller.nil? then previous - elsif controller[0] == ?/ then controller[1..-1] - elsif %r{^(.*)/} =~ previous then "#{$1}/#{controller}" - else controller - end - end end end end -- cgit v1.2.3