So returning nil instead of empty string is the catch, cool. That's
completely doable!

RSL

On 2/16/07, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> The "=" command won't do anything if it's fed nil, so you could create a
> helper like so:
>
> def nillify(str)
>   str.empty? ? nil : str
> end
>
> And then do
>
> = nillify(some_helper_method)
>
> Hope that helps.
>
> - Nathan
>
> On 2/16/07, RSL <[EMAIL PROTECTED]> wrote:
> >
> >
> > I'm in love with Haml. The only problem I can see at all [for me]
> > [right now] is that there are blank lines in the HTML when something
> > like
> >
> > = some_helper_method
> >
> > returns an empty string or nil or whatever. Is there some way to tell
> > the template to skip the newline on an empty line that I'm missing?
> >
> > Thanks in advance,
> >
> > RSL
> >
> >
> >
>
> >
>

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