instance method
tag_option
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v4.2.9 PrivateSignature
tag_option(key, value, escape)
No documentation comment.
Parameters
-
keyreq -
valuereq -
escapereq
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