Steve,
You are passing a block when you use the 'do' keyword. When you pass
a block into form_tag, it writes directly to the page.
As an rhtml example (because I think Haml formatting might get
clobbered when I send this):
<% form_tag whatever do %>
... fields, html, etc goes here
<% end %>
or,
<%= form_tag(whatever) %>
... fields, html, etc goes here
<% end_form_tag %>
So if you see the way I've not-used and used = there hopefully that
will help clear things up.
Cheers,
Brad
On 17/10/2007, at 4:37 PM, Steve wrote:
>
> This has probably been asked before, but I can't find anything on it
> (-,
> and = aren't the best search terms :) ).
>
> The documentation indicates that - evaluates the ruby content but
> does not
> output it, and that = evals and outputs. However to display say a
> form_tag, I have to do
>
> - form_tag whatever_path do
>
> If I use the = it causes it to render twice. Not only does the
> duplication
> seem screwy, but this seems to contradict what the docs indicate
> should
> happen with those two operators. What exactly is going on here?
>
> Thanks,
> Steve
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---