aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-11-23 19:17:53 -0600
committerJoshua Peek <josh@joshpeek.com>2009-11-23 19:17:53 -0600
commit01c9f99c5370031fcce32931d45b4ca3070cbb3d (patch)
tree981566d3c4e61e8849a3ea03c4f9660f72fe7a30 /actionpack/lib
parentef771552b74aa03925c201603f9430602192e818 (diff)
downloadrails-01c9f99c5370031fcce32931d45b4ca3070cbb3d.tar.gz
rails-01c9f99c5370031fcce32931d45b4ca3070cbb3d.tar.bz2
rails-01c9f99c5370031fcce32931d45b4ca3070cbb3d.zip
Kill dead routing internals helpers
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing.rb26
1 files changed, 0 insertions, 26 deletions
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