diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 07:57:26 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-28 11:38:35 +0800 |
commit | 71acc2737aa346ee57f9fc21252a508ae83367a4 (patch) | |
tree | ddb12b7813d20b4003c874604620d0aef7ace31a /actionpack/lib/action_dispatch | |
parent | b7934afe326f8bba9cdcacdfac93062dff155efe (diff) | |
download | rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.gz rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.bz2 rails-71acc2737aa346ee57f9fc21252a508ae83367a4.zip |
Move uri parser to AS as URI.parser method to reuse it in AP and ARes.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 9271191f6d..8d9f0cfdeb 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -5,8 +5,6 @@ require 'active_support/core_ext/object/to_query' module ActionDispatch module Routing class RouteSet #:nodoc: - include ActionController::UriParser - PARAMETERS_KEY = 'action_dispatch.request.path_parameters' class Dispatcher #:nodoc: @@ -68,7 +66,7 @@ module ActionDispatch end def split_glob_param!(params) - params[@glob_param] = params[@glob_param].split('/').map { |v| uri_parser.unescape(v) } + params[@glob_param] = params[@glob_param].split('/').map { |v| URI.parser.unescape(v) } end end @@ -546,7 +544,7 @@ module ActionDispatch params.each do |key, value| if value.is_a?(String) value = value.dup.force_encoding(Encoding::BINARY) if value.encoding_aware? - params[key] = uri_parser.unescape(value) + params[key] = URI.parser.unescape(value) end end @@ -563,10 +561,6 @@ module ActionDispatch end private - def uri_parser - @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI - end - def handle_positional_args(options) return unless args = options.delete(:_positional_args) |