提交 be984f02 编写于 作者: A Akira Matsuda

Unneeded attr_accessor with side effects

上级 fd63aa02
......@@ -578,8 +578,6 @@ def post.tag_ids; [1]; end
end
def test_form_with_with_file_field_generate_multipart
Post.send :attr_accessor, :file
form_with(model: @post, id: "create-post") do |f|
concat f.file_field(:file)
end
......@@ -592,8 +590,6 @@ def test_form_with_with_file_field_generate_multipart
end
def test_fields_with_file_field_generate_multipart
Comment.send :attr_accessor, :file
form_with(model: @post) do |f|
concat f.fields(:comment, model: @post) { |c|
concat c.file_field(:file)
......
......@@ -1751,8 +1751,6 @@ def post.tag_ids; [1]; end
end
def test_form_for_with_file_field_generate_multipart
Post.send :attr_accessor, :file
form_for(@post, html: { id: "create-post" }) do |f|
concat f.file_field(:file)
end
......@@ -1765,8 +1763,6 @@ def test_form_for_with_file_field_generate_multipart
end
def test_fields_for_with_file_field_generate_multipart
Comment.send :attr_accessor, :file
form_for(@post) do |f|
concat f.fields_for(:comment, @post) { |c|
concat c.file_field(:file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册