Permalink
Browse files

Merge pull request #12281 from kennyj/add_doc_about_12276

[ci skip] Add some comment about downcase url encoded string.
  • Loading branch information...
1 parent fab8c3d commit 4900ad453b434d7b8ee162a7a31049079ad43f39 @rafaelfranca rafaelfranca committed Sep 22, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -7,11 +7,13 @@ class Utils # :nodoc:
# Normalizes URI path.
#
# Strips off trailing slash and ensures there is a leading slash.
+ # Also converts downcase url encoded string to uppercase.
#
# normalize_path("/foo") # => "/foo"
# normalize_path("/foo/") # => "/foo"
# normalize_path("foo") # => "/foo"
# normalize_path("") # => "/"
+ # normalize_path("/%ab") # => "/%AB"
def self.normalize_path(path)
path = "/#{path}"
path.squeeze!('/')

0 comments on commit 4900ad4

Please sign in to comment.