Sure, it's valid syntax. But thats only if you add a "-" operator to Symbol and
a url local variable exists.
I meant that its a problem because its valid ruby syntax, so to support it haml
would maybe have to do some crazy hacks to recognize this and transform it into
:"data-url"
I wasn't aware of haml's :data sugar syntax, so it sounds like thats a pretty
good alternative.
On Mar 21, 2010, at 3:23 PM, Yehuda Katz wrote:
> It's not valid Ruby syntax.
>
> >> {:data-url => "omg"}
> NameError: undefined local variable or method `url' for main:Object
> from (irb):2
>
> it parses as :data - url.
>
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
>
>
> On Sun, Mar 21, 2010 at 3:05 PM, Jacques Crocker <[email protected]> wrote:
> Seems like i'd be nice to have a fix for this so :data-url => "foo" works,
> especially given the focus on html5 data attributes in rails3. It sort of
> sucks though since it's valid ruby syntax so fixing it might involved some
> ugly internal hacks.
>
>
>
> On Mar 21, 2010, at 2:59 PM, buhrmi wrote:
>
> > Hi there,
> >
> > quite simple to reproduce bug:
> >
> > %sometag{:data-url => 'foo'}
> >
> > gives: undefined local variable or method 'url' for #<Class>
> >
> > one can of free german beer for the person who fixes that.
> >
> > Thanks :)
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>
>
> --
> 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.
--
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.