Only one form_helper per rhtml in rails?

hi,

i’m writing an short rails-app for some friends of mine and now i came
over an strange error?!?!

i wrote an rhtml with 2 forms (both with form helpers), the only
difference of them is that they use call different actions of the same
controller.

CODE:
Gehaltsabrechnung ansehen:

<%= form_tag :controller => ‘invoices’,
:action => ‘show’ %>
Jahr:
<%= select(:invoice, :jahr, 2007…2107) %>
Monat:
<%= select(:invoice, :monat, 1…12) %>
<%= submit_tag “show” %>
<% end_form_tag %>



Gehaltsabrechnung erstellen:

<%= form_tag :controller => ‘invoices’,
:action => ‘create’ %>
Jahr:
<%= select(:invoice, :jahr, 2007…2107) %>
Monat:
<%= select(:invoice, :monat, 1…12) %>
<%= submit_tag “Create” %>
<% end_form_tag %>

now i have the problem that only the first form works - if i submit on
the second one the action of the first one is performed!!!

please help!!!

greetz red

red wrote:



found the problem - new syntax for the form_tag - now with “do”

greetz red

On Aug 28, 2007, at 7:01 AM, red wrote:

Gehaltsabrechnung ansehen:

<%= form_tag :controller => ‘invoices’,
the second one the action of the first one is performed!!!

please help!!!

greetz red

Both of your forms can work, each form can call to a different method
in the controller.
Double check your form.