I don't think it's worth importing an entire json serializer just to 
avoid a call to #to_json.

Lawrence Pit wrote:
> Hi All,
>
> I'm looking for something like:
>
> %a{ :href => '/post', :data => {:method => :delete, :confirm => 'Are you 
> sure?'} } Delete
>
> which would turn into:
>
> <a href="/post" data="{method:'delete', confirm:'Are you sure?'}">Delete</a>
>
> which would allow to do something like this in jQuery:
>
>   if (!confirm($(this).metadata().confirm)) return false;
>   m = "_method=" + $(this).metadata().method;
>   // etc.
>
> In other words, I'm looking for haml to turn an attributes_hash value 
> into a json object instead of into simply strings produced by the 
> inspect method as it does now.
>
> I'm polling whether this is something others would consider useful as well?
>
> (Looking at the rails code turning a hash into a json object involves 
> quite a bit of code, not sure haml is up for supporting that...)
>
>
>
> Regards,
> Lawrence
>
>
> >
>
>   


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