The problem is that the code within the block isn't registered by Haml as
Ruby code. It just looks like plain text. If you add a hyphen in front of
the lines you want to be interpreted as Ruby, the code should work.

2009/11/23 François Montel <[email protected]>

> Wondering why the following doesn't not work (no error, but doesn't
> generate the javascript):
>
> <pre>
>    = link_to_function('CONTRIBUTE', nil, :style =>
> "background:none;") do |page|
>      page.visual_effect(:blind_up, 'search', { :duration => 0.5 })
>      page.visual_effect(:toggle_blind, 'submit', { :duration =>
> 0.5 })
> </pre>
>
> I extracted it to a helper and it works okay, but according to the
> haml docs, I should be able to put a block like this in my haml view.
>
> --
>
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=.
>
>
>

--

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=.


Reply via email to