On 16 Nov., 21:33, Nathan Weizenbaum <[email protected]> wrote:
> Notice that in the ERB examples for link_to_unless don't actually include
> any raw HTML text within the block; that is, the entire block is within the
> <%= ... %>. You need to do the same with Haml if you want to use the helper.
> That means that you can't use = or any of the HTML-generating Haml code; you
> have to use
>
>   - "<strong class='current'>#{h name}</strong>"
>
> instead.

Thanks a lot, Nathan!

I changed the code to:
  = link_to_unless_current 'Dein Profil', user_url(current_user) do |
name| "<strong class='current'>#{name}</strong>" end
which works fine!

Regards -Tobias

--

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