Not exactly... I want to add the class "active" to the current link.

I created a helper which check the current page using current_page?,
used by link_to_unless_current.

On 5 jan, 00:22, stephen murdoch <[email protected]>
wrote:
> I normally just do this:
>
>   = link_to_unless_current "Home", root_path do |link|
>     - content_tag 'span', link, :class=>'current'
>
> It works.  Unless of course you NEED to use 'link_to' inside your
> block.  Is there any particular reason for that?  If you are setting a
> link to 'active' then you are surely making it unclickable....  So
> it's not a link anymore.
-- 
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