I would do it as....

%li{:class => "folder #{'selected' if @folder_id == folder.id}"}


or, if its useful...

def selected_if(value)
  'selected' if value
end

%li{:class => "folder " + selected_if(@folder_id == folder.id)}

Enjoy!

-hampton.


On 2/10/07, weepy <[EMAIL PROTECTED]> wrote:
>
> in trunk u can do
>
> == <li class="folder #{" selected" if @folder_id == folder.id }">
>
> tho really it looks like a good case for a helper
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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