The problem with the first case is that you're not properly creating the
attributes hash. It's a literal Ruby hash, so you use "=>" to associate
values with names.
There already is an ERB filter (accessed by :erb, unsurprisingly), but
at the moment, filters don't have the capability of accessing runtime
information about the template, and Ruby code evaluated in the :erb and
:ruby filters doesn't run in the current ActionView instance. This will
probably be changed in upcoming releases.
- Nathan
ridcully wrote:
> hi!
>
> first i'd like to thank you guys for haml. it's just wonderful,
> writing views finally is fun again, and i don't have to search these
> annoying < > characters anymore on the keyboard (european layout
> sucks)
>
> now my questions, first, why doesn't this work:
>
> .{:style="color:red"}= Time.now
>
> it does work if i remove the attributes, or put the ruby code in a new
> line
>
> .= Time.now
> .{:style="color:red"}
> = Time.now
>
> am i missing something here?
>
>
> then, i tried to write an erb filter (for that rhtml feeling), but i
> was unable to access any helper methods that should be available from
> that view inside the filter. isn't this supposed to be possible?
>
> many thanks
> andi
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---