How do I set the name of a form in Rails? -
i tried
<%= form_tag ("/ombcauth", name:"ombc_form") %>
but gave me syntax error:
syntax error, unexpected ',', expecting ')' ...append= form_tag ("/ombcauth", name:"ombc_form") @output...
i tried
<%= form_tag ({action:"/ombcauth"}, {name:"ombc_form"}) %>
but gave me syntax error
syntax error, unexpected ',', expecting ')' ...form_tag ({action:"/ombcauth"}, {name:"ombc_form"}) @outp...
i need reference form in link submit.
<%= link_to "ombc auth", "#", {onclick: "document.ombc_form.submit(); return false;"} %>
rails --version
rails 3.2.11
what did correct. problem in white space between form_tag
, (
:
<%= form_tag("/ombcauth", name:"ombc_form") %>
or without parenthesis:
<%= form_tag "/ombcauth", name:"ombc_form" %>
hope helps!
Comments
Post a Comment