method

normalize_path

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: Utils
normalize_path(path) public

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"
Show source
Register or log in to add new notes.