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:
parent
f9761739a3
commit
af4d9def81
2 changed files with 5 additions and 5 deletions
|
@ -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",
|
||||
|
|
|
@ -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('Input collected!')\" autocomplete=\"off\" />
|
||||
# # => <input type="hidden" name="collected_input" id="collected_input"
|
||||
# value="" onchange="alert('Input collected!')" autocomplete="off" />
|
||||
def hidden_field_tag(name, value = nil, options = {})
|
||||
text_field_tag(name, value, options.merge(type: :hidden, autocomplete: "off"))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue