Hi… new to the whole Rails thing so this may sound aweful strange
but I cannot find any documentation supporting or correcting what I am
trying to do…
I would like to have 2 separate form_tag’s displayed on a single
page. They both have varying function so my thinking is 2 separate
form_tag’s (am I wrong).
My problem is when the page renders it only renders 1 form but housing
the varu=ious components of each form_tag (eg. input boxes, submit
button etc). There are 2 submit buttons for each of the functions Im
wanting to perfom but because they are caught up under the one
form_tag, it doesnt matter which one I press, only the one action is
ever performed…
As mentioned, very new so not sure what I should be doing…
<%= form_tag(:controller => ‘public’, :action => ‘send_login’) %>
<%= error_messages_for ‘user’ %>
user name : | <%= text_field(:user, :username) %> |
---|---|
password : | <%= password_field(:user, :password) %> |
<%= submit_tag(‘Login’) %> | <%= link_to(‘new venue’, :controller => ‘venue’, :action => ‘new’) %> |
<%= form_tag %>
<h2>Commenter Login</h2>
<%= form_tag('send_feedback', :controller => 'public', :action =>
‘send_fedback’) %>
<%= error_messages_for ‘temp’ %>
venue code : | <%= text_field(:comments, :restaurant_id) %> |
---|---|
<%= submit_tag(‘Feedback’) %> |
<%= form_tag %>