instance method tag_option

Ruby on Rails 3.2.22.5

Since v3.2.22.5 Last seen in v4.2.9 Private

Available in: v3.2.22.5 v4.0.13 v4.1.16 v4.2.9

Signature

tag_option(key, value, escape)

No documentation comment.

Parameters

key req
value req
escape req
Source
# File actionpack/lib/action_view/helpers/tag_helper.rb, line 157
        def tag_option(key, value, escape)
          if value.is_a?(Array)
            value = escape ? safe_join(value, " ") : value.join(" ")
          else
            value = escape ? ERB::Util.html_escape(value) : value.to_s
          end
          %(#{key}="#{value.gsub(/"/, '"'.freeze)}")
        end

Defined in actionpack/lib/action_view/helpers/tag_helper.rb line 157 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::TagHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close