instance method
remove_trailing_slash!
Ruby on Rails 7.0.10
Since v6.1.7.10 PrivateSignature
remove_trailing_slash!(url_string)
No documentation comment.
Parameters
-
url_stringreq
Source
# File actionview/lib/action_view/helpers/url_helper.rb, line 853
def remove_trailing_slash!(url_string)
trailing_index = (url_string.index("?") || 0) - 1
url_string[trailing_index] = "" if url_string[trailing_index] == "/"
end
Defined in actionview/lib/action_view/helpers/url_helper.rb line 853
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::UrlHelper