mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
There are no snowmen here
This commit is contained in:
parent
94df84a8a4
commit
1cbe917237
3 changed files with 7 additions and 7 deletions
|
@ -611,8 +611,8 @@ module ActionView
|
|||
end
|
||||
|
||||
def extra_tags_for_form(html_options)
|
||||
snowman_tag = tag(:input, :type => "hidden",
|
||||
:name => "utf8", :value => "✓".html_safe)
|
||||
utf8_enforcer = tag(:input, :type => "hidden",
|
||||
:name => "utf8", :value => "✓".html_safe)
|
||||
|
||||
authenticity_token = html_options.delete("authenticity_token")
|
||||
method = html_options.delete("method").to_s
|
||||
|
@ -629,7 +629,7 @@ module ActionView
|
|||
tag(:input, :type => "hidden", :name => "_method", :value => method) + token_tag(authenticity_token)
|
||||
end
|
||||
|
||||
tags = snowman_tag << method_tag
|
||||
tags = utf8_enforcer << method_tag
|
||||
content_tag(:div, tags, :style => 'margin:0;padding:0;display:inline')
|
||||
end
|
||||
|
||||
|
|
|
@ -1890,7 +1890,7 @@ class FormHelperTest < ActionView::TestCase
|
|||
assert_dom_equal expected, output_buffer
|
||||
end
|
||||
|
||||
def snowman(method = nil)
|
||||
def hidden_fields(method = nil)
|
||||
txt = %{<div style="margin:0;padding:0;display:inline">}
|
||||
txt << %{<input name="utf8" type="hidden" value="✓" />}
|
||||
if method && !method.to_s.in?(['get', 'post'])
|
||||
|
@ -1918,7 +1918,7 @@ class FormHelperTest < ActionView::TestCase
|
|||
method = options
|
||||
end
|
||||
|
||||
form_text(action, id, html_class, remote, multipart, method) + snowman(method) + contents + "</form>"
|
||||
form_text(action, id, html_class, remote, multipart, method) + hidden_fields(method) + contents + "</form>"
|
||||
end
|
||||
|
||||
def test_default_form_builder
|
||||
|
|
|
@ -9,7 +9,7 @@ class FormTagHelperTest < ActionView::TestCase
|
|||
@controller = BasicController.new
|
||||
end
|
||||
|
||||
def snowman(options = {})
|
||||
def hidden_fields(options = {})
|
||||
method = options[:method]
|
||||
|
||||
txt = %{<div style="margin:0;padding:0;display:inline">}
|
||||
|
@ -34,7 +34,7 @@ class FormTagHelperTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
def whole_form(action = "http://www.example.com", options = {})
|
||||
out = form_text(action, options) + snowman(options)
|
||||
out = form_text(action, options) + hidden_fields(options)
|
||||
|
||||
if block_given?
|
||||
out << yield << "</form>"
|
||||
|
|
Loading…
Reference in a new issue