Permalink
Browse files

Kill dead routing internals helpers

  • Loading branch information...
1 parent ef77155 commit 01c9f99c5370031fcce32931d45b4ca3070cbb3d @josh josh committed Nov 24, 2009
Showing with 0 additions and 26 deletions.
  1. +0 −26 actionpack/lib/action_dispatch/routing.rb
@@ -264,11 +264,8 @@ module Routing
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 @@ def possible_controllers
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

0 comments on commit 01c9f99

Please sign in to comment.