In response to myself, having nil eliminate the attribute is kind of
nice specifically for this checked attribute case.  Makes having it
conditionally checked much simpler.  However, it means I can't really
think of a way to express leaving the attribute value off entirely.
Oh well.

On Jul 23, 11:21 pm, Tom Bagby <[EMAIL PROTECTED]> wrote:
> Thanks very much.  I agree that there should be a difference.  The
> patch as submitted needs to also handle build_attributes in Buffer as
> well.  Maybe now is the time to make a single build_attributes class
> method, Nathan?
>
> There is another interpretation of nil attributes that I think I
> prefer.  There is currently no way to add attributes without values.
> Like
>
> <input type=checkbox checked>
>
> You have to assign a dummy value for the checked attribute, which
> works, but is not really correct.  I've really wanted to have that
> available and I'm not sure of another syntax that would work for it.
> Also, I think this case might be more common than wanting to
> conditionally eliminate attributes.  Opinions?
>
> -Tom
>
> On Jul 23, 7:40 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> > Agreed. I'll try to apply it tonight.
>
> > - Nathan
>
> > Mislav Marohnić wrote:
> > > On 7/23/07, *Jan Szumiec* <[EMAIL PROTECTED]
> > > <mailto:[EMAIL PROTECTED]>> wrote:
>
> > >     I found that haml currently doesn't distinguish between nil and empty
> > >     ("") attributes which seems to me a little bit weird.
>
> > > This is a serious issue!
> > > +1 for your patch


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