Fix documentation output to remove escaping

This commit is contained in:
Rafael Mendonça França 2022-01-05 20:50:37 +00:00
parent f9761739a3
commit af4d9def81
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
2 changed files with 5 additions and 5 deletions

@ -1149,7 +1149,7 @@ def prompt_option_tag(type, options)
# Builds hidden input tag for date part and value.
# build_hidden(:year, 2008)
# => "<input type=\"hidden\" id=\"date_year\" name=\"date[year]\" value=\"2008\" autocomplete=\"off\" />\n"
# => "<input type="hidden" id="date_year" name="date[year]" value="2008" autocomplete="off" />"
def build_hidden(type, value)
select_options = {
type: "hidden",

@ -294,14 +294,14 @@ def label_tag(name = nil, content_or_options = nil, options = nil, &block)
#
# ==== Examples
# hidden_field_tag 'tags_list'
# # => <input type=\"hidden\" name=\"tags_list\" id=\"tags_list\" autocomplete=\"off\" />
# # => <input type="hidden" name="tags_list" id="tags_list" autocomplete="off" />
#
# hidden_field_tag 'token', 'VUBJKB23UIVI1UU1VOBVI@'
# # => <input type=\"hidden\" name=\"token\" id=\"token\" value=\"VUBJKB23UIVI1UU1VOBVI@\" autocomplete=\"off\" />
# # => <input type="hidden" name="token" id="token" value="VUBJKB23UIVI1UU1VOBVI@" autocomplete="off" />
#
# hidden_field_tag 'collected_input', '', onchange: "alert('Input collected!')"
# # => <input type=\"hidden\" name=\"collected_input\" id=\"collected_input\"
# value=\"\" onchange=\"alert(&#39;Input collected!&#39;)\" autocomplete=\"off\" />
# # => <input type="hidden" name="collected_input" id="collected_input"
# value="" onchange="alert(&#39;Input collected!&#39;)" autocomplete="off" />
def hidden_field_tag(name, value = nil, options = {})
text_field_tag(name, value, options.merge(type: :hidden, autocomplete: "off"))
end