Yes, I agree. In fact, I agree so much, I just implemented it in Trunk.

- Nathan

Tom Bagby wrote:
> I think it should keep adding on to the classes string like it does
> for the css style attributes.  I think if you are using the object ref
> style then you probably really want it there.  The object ref thing is
> pure syntax sugar, if you really needed to override it, you can just
> rewrite it moving things to the attributes hash and do it explicitly.
>
> -Tom
>
> On Jun 5, 4:40 pm, Sean Cribbs <[EMAIL PROTECTED]> wrote:
>   
>> In examining the source, Tom seems to be right.  I guess the question is
>> more one of style and convention than implementation.  What would break
>> or work inconsistently if the attributes_hash was merged first?  I think
>> the big one is the converse of what I want to do -- if the user wanted
>> to override (i.e. replace) the id or class of the object reference.
>>
>> Sean
>>
>>
>>
>>     
>>> Nathan, I assumed this was an unintentional quirk in the
>>> implementation?  Seems like it is reordering the merges and passing
>>> all the existing attributes to the object ref stuff that would fix his
>>> problem, yes?  As in %div{:class => condition ? "selected" : ""}
>>> [item]  would work fine, special case of supplying nil is
>>> unnecessary?  (Though that will work also since with all the to_s'ing,
>>> the nil turns into a "" also in the current version)
>>>       
>>> -Tom
>>>       
>
>
> >
>
>   


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