提交 d3cfee11 编写于 作者: F Franco Brusatti 提交者: Santiago Pastorino

removing generation of id in submit helper

[#6369 state:committed]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 23a3ba42
......@@ -1243,7 +1243,7 @@ def file_field(method, options = {})
def submit(value=nil, options={})
value, options = nil, value if value.is_a?(Hash)
value ||= submit_default_value
@template.submit_tag(value, options.reverse_merge(:id => "#{object_name}_submit"))
@template.submit_tag(value, options)
end
def emitted_hidden_id?
......
......@@ -630,7 +630,7 @@ def test_form_for
"<textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea>" +
"<input name='post[secret]' type='hidden' value='0' />" +
"<input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' />" +
"<input name='commit' id='post_submit' type='submit' value='Create post' />"
"<input name='commit' type='submit' value='Create post' />"
end
assert_dom_equal expected, output_buffer
......@@ -709,7 +709,7 @@ def test_form_for_with_symbol_object_name
"<textarea name='other_name[body]' id='other_name_body' rows='20' cols='40'>Back to the hill and over it again!</textarea>" +
"<input name='other_name[secret]' value='0' type='hidden' />" +
"<input name='other_name[secret]' checked='checked' id='other_name_secret' value='1' type='checkbox' />" +
"<input name='commit' id='other_name_submit' value='Create post' type='submit' />"
"<input name='commit' value='Create post' type='submit' />"
end
assert_dom_equal expected, output_buffer
......@@ -843,7 +843,7 @@ def test_submit_with_object_as_new_record_and_locale_strings
end
expected = whole_form('/posts', 'new_post', 'new_post') do
"<input name='commit' id='post_submit' type='submit' value='Create Post' />"
"<input name='commit' type='submit' value='Create Post' />"
end
assert_dom_equal expected, output_buffer
......@@ -859,7 +859,7 @@ def test_submit_with_object_as_existing_record_and_locale_strings
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'put') do
"<input name='commit' id='post_submit' type='submit' value='Confirm Post changes' />"
"<input name='commit' type='submit' value='Confirm Post changes' />"
end
assert_dom_equal expected, output_buffer
......@@ -875,7 +875,7 @@ def test_submit_without_object_and_locale_strings
end
expected = whole_form do
"<input name='commit' class='extra' id='post_submit' type='submit' value='Save changes' />"
"<input name='commit' class='extra' type='submit' value='Save changes' />"
end
assert_dom_equal expected, output_buffer
......@@ -891,7 +891,7 @@ def test_submit_with_object_and_nested_lookup
end
expected = whole_form('/posts/123', 'another_post_edit', 'another_post_edit', :method => 'put') do
"<input name='commit' id='another_post_submit' type='submit' value='Update your Post' />"
"<input name='commit' type='submit' value='Update your Post' />"
end
assert_dom_equal expected, output_buffer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册