From 2f326b7f27349b933fe617d83b3f80c6573ce5d8 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Mon, 27 Sep 2010 15:13:11 -0300 Subject: Remove warning "URI.unescape is obsolete" from actionpack. Signed-off-by: Santiago Pastorino --- actionpack/lib/action_dispatch/routing/route_set.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index a203ee5934..4289e78641 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -5,6 +5,8 @@ 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,10 +70,6 @@ module ActionDispatch def split_glob_param!(params) params[@glob_param] = params[@glob_param].split('/').map { |v| uri_parser.unescape(v) } end - - def uri_parser - @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI - end end # A NamedRouteCollection instance is a collection of named routes, and also -- cgit v1.2.3