I think what mixhere is trying to do is nest #c beneath both #a and #b, 
although that's not entirely clear from the ERB indentation.

Mixhere, this is a case where I'd use the normal attribute syntax to set 
the id. For example:

  %div{:id => login? ? 'a' : 'b'}
    #c

or more readably,

  %div{:id => some_descriptive_helper_name}
    #c

- Nathan

Wincent Colaiuta wrote:
> El 24/2/2008, a las 14:58, mixhere escribió:
>
>   
>> <% if login? -%>
>>  <div id='a'>
>> <% else -%>
>>  <div id='b'>
>> <% end -%>
>>  <div id='c'>
>>  I am c
>>  </div>
>>  </div>
>>
>>
>> - if login?
>>  #a
>>    #c
>> - else
>>  #b
>>    #c
>>
>> is there any other ways to not repeat #c two times?
>>     
>
> -if login?
>    #a
> -else
>    #b
>    #c
>
> Wincent
>
>
> >
>
>   


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