instance method
tag_option
Ruby on Rails 5.0.7.2
Since v3.2.22.5 Last seen in v5.0.7.2 Private — implementation detail, not part of the public APISignature
tag_option(key, value, escape)
No documentation comment.
Parameters
-
keyreq -
valuereq -
escapereq
Source
# File actionview/lib/action_view/helpers/tag_helper.rb, line 186
def tag_option(key, value, escape)
if value.is_a?(Array)
value = escape ? safe_join(value, " ".freeze) : value.join(" ".freeze)
else
value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s
end
%(#{key}="#{value.gsub('"'.freeze, '"'.freeze)}")
end
Defined in actionview/lib/action_view/helpers/tag_helper.rb line 186
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::TagHelper