instance method remove_trailing_slash!

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

remove_trailing_slash!(url_string)

No documentation comment.

Parameters

url_string req
Source
# File actionview/lib/action_view/helpers/navigation_helper.rb, line 649
        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/navigation_helper.rb line 649 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::NavigationHelper

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close