我想在 form_tag helper 中发送一个参数,就像我们可以通过 rails 中的 link_to helper 发送一个参数,如下所示:
<%= link_to("Send Invitation", {:controller => 'l_home', :action => 'sendConnectRequest', foo: "hello world!!!"}, :class => "btn-primary")%>
同样,我试图这样做
<%= form_tag({:action => "sendConnectRequest", :method => 'post', foo: "hello world!!!"}) do %>
是为了在 form_tag 中发送参数,但它不起作用:(
需要帮助
谢谢