form_tag code block

I have this in a template->

Hello <% form_tag :action => "create" do %> My pretty form! <% end %>

And all I'm getting at output is ->

Hello

Actually, any actionview helper that is supposed to take a code block is not working for me. What wicked stupid thing am I missing here?

Thanks for the reply!

Sadly, though, I tried that.

Error->

compile error C:/INSTAN~1/rails_apps/lumina_erp/config/../app/views/bom_lines/ edit.rhtml:2: parse error, unexpected ')' _erbout.concat(( form_tag :action => "create" do ).to_s); _erbout.concat "\n"                                                   ^ C:/INSTAN~1/rails_apps/lumina_erp/config/../app/views/bom_lines/ edit.rhtml:5: parse error, unexpected kEND, expecting ')'

Obvioulsy from the error message you can see that this is on a M$ machine (InstantRails 1.4 WinXP).

Anyways, just tried it on Ubuntu server and it works fine. Must be a problem with InstantRails.

So to recap... The first way I posted (and that's all over api.rubyonrails.org) is correct. I'm gonna try and update activeview through gem now I guess.

Thanks for your help!

Have you tried adding form fields to the form tag? i.e.

Hello <% form_tag :action => "create" do %>   <p>My pretty form!</p>   <p><%= text_field "foo", "bar" %></p>   <p><%= submit_tag "Do it!" %></p> <% end %>

Also when you said it only outputted Hello was that what you saw
rendered in the browser or was that the source of the output?

Niels