I think the example you gave should work, but there are a few cases where
the Haml parser will fail to parse Ruby interpolation. The following, for
example:
foo #{"bar}"}
This is because Haml doesn't do any parsing of the Ruby code except to try
to make sure brackets are balanced, so brackets within Ruby strings will be
counted as Haml brackets. At some point, Haml may try to do some basic Ruby
lexing to fix this in more cases, but that's pretty difficult to get right.
On Mon, Sep 28, 2009 at 12:56 AM, harald <[email protected]> wrote:
>
> I have just start using haml but have some problems to understand how
> to escape a ruby hash.
>
> like this one for example:
>
> #{func({"animal" => true, "nummber" => 5})}
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---