instance method add_method_to_attributes!

Ruby on Rails edge

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

Signature

add_method_to_attributes!(html_options, method)

No documentation comment.

Parameters

html_options req
method req
Source
# File actionview/lib/action_view/helpers/navigation_helper.rb, line 551
        def add_method_to_attributes!(html_options, method)
          if method_not_get_method?(method) && !html_options["rel"].to_s.include?("nofollow")
            if html_options["rel"].blank?
              html_options["rel"] = "nofollow"
            else
              html_options["rel"] = "#{html_options["rel"]} nofollow"
            end
          end
          html_options["data-method"] = method
        end

Defined in actionview/lib/action_view/helpers/navigation_helper.rb line 551 · 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