form_for closes <form> tag

前端 未结 3 568
情书的邮戳
情书的邮戳 2020-12-11 16:36

I have a strange situation happening on a page where my

tags are being closed immediately, leaving the form\'s contents on their own and not useful
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 16:56

    My way to fix it is to include the submit button right before the end and make the button not display.

      <%= submit_tag('',style: 'width:0;height:0;display:none;') %>
    <% end %>
    

    This puts the ending tag right where I need it.

提交回复
热议问题