Q:

Include? condition in haml view

I try to make something like this in haml view :
%li{:class => @taxon and ([@taxon] + @taxon.ancestors).include?(taxon) : "current"}

what the correct syntax ?

A:

I'm guessing the value of @taxon is the class name? If so this should work for you.  
- taxon_class = (@taxon && ([@taxon] + @taxon.ancestors).include?(taxon)) ? @taxon : "current"
%li{:class => taxon_class}

I always find it easier to do the ruby logic outside of the haml {} brackets.

