The issue is how form_tag creates it's output. You'll notice in the 
Rails docs, it uses the RHTML equivalent of -, <%, as opposed to the 
equivalent of =, <%=. This is because form_for outputs directly to the 
buffer that's gathering the eventual Haml result string. This is done as 
a side effect; you don't need to deal with its return value. It so 
happens that it also returns the text it added, so that using = causes 
duplication.

- Nathan

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to