aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey
diff options
context:
space:
mode:
authorJon Moss <maclover7@users.noreply.github.com>2017-04-30 10:42:58 -0400
committerGitHub <noreply@github.com>2017-04-30 10:42:58 -0400
commit79a65fea5c24901e0dfbe3e889146311bc7ffa92 (patch)
tree8f692034e6c0c97b1abefeb4eaae6c5cd15e5f72 /actionpack/lib/action_dispatch/journey
parent5fa0a93119e94208e3a361dbd8908a9f08c10bae (diff)
parent0d0015c98ad9af08f812a692ca30a70e66a75159 (diff)
downloadrails-79a65fea5c24901e0dfbe3e889146311bc7ffa92.tar.gz
rails-79a65fea5c24901e0dfbe3e889146311bc7ffa92.tar.bz2
rails-79a65fea5c24901e0dfbe3e889146311bc7ffa92.zip
Merge pull request #28936 from dixpac/dixpac/update-docs-ActionDispatch__Journey__Router__Utils.unescape_uri
Add docs for Router::Utils.unescape_uri method. [ci skip]
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r--actionpack/lib/action_dispatch/journey/router/utils.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb
index ffcd875b4d..f937597c1b 100644
--- a/actionpack/lib/action_dispatch/journey/router/utils.rb
+++ b/actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -84,6 +84,10 @@ module ActionDispatch
ENCODER.escape_fragment(fragment.to_s)
end
+ # Replaces any escaped sequences with their unescaped representations
+ #
+ # uri = "/topics?title=Ruby%20on%20Rails"
+ # unescape_uri(uri) #=> "/topics?title=Ruby on Rails"
def self.unescape_uri(uri)
ENCODER.unescape_uri(uri)
end