提交 4b576f48 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #27367 from georgeclaghorn/local-form-with

Avoid invalid attribute on local forms generated by `form_with`
......@@ -2293,10 +2293,6 @@ def convert_to_legacy_options(options)
if options.key?(:skip_id)
options[:include_id] = !options.delete(:skip_id)
end
if options.key?(:local)
options[:remote] = !options.delete(:local)
end
end
end
end
......
......@@ -116,6 +116,16 @@ def test_form_with_with_block_and_method_in_erb
assert_dom_equal expected, output_buffer
end
def test_form_with_with_block_in_erb_and_local_true
output_buffer = render_erb("<%= form_with(url: 'http://www.example.com', local: true) do %>Hello world!<% end %>")
expected = whole_form("http://www.example.com", local: true) do
"Hello world!"
end
assert_dom_equal expected, output_buffer
end
end
class FormWithActsLikeFormForTest < FormWithTest
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册