1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

View file

@ -1149,7 +1149,7 @@ module ActionView
# 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",

View file

@ -294,14 +294,14 @@ module ActionView
#
# ==== 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