:data-url is not valid Ruby syntax. Ruby symbol literals may not contain
hyphens unless they use quotation marks, like so: :"data-url". Since it's
not valid Ruby, Haml won't parse it for the Haml hash syntax. You could use
the HTML attribute syntax, and do %sometag(data-url="foo"), or you could use
the new data sugar and do %sometag{:data => {:url => "foo"}}.

On Sun, Mar 21, 2010 at 3:05 PM, Jacques Crocker <merbj...@gmail.com> 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 h...@googlegroups.com.
> > To unsubscribe from this group, send email to
> haml+unsubscr...@googlegroups.com <haml%2bunsubscr...@googlegroups.com>.
> > 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 h...@googlegroups.com.
> To unsubscribe from this group, send email to
> haml+unsubscr...@googlegroups.com <haml%2bunsubscr...@googlegroups.com>.
> 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 h...@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to