开发者

Preserve attribute ordering in Haml

If I create an XML element in HAML:

%tag{:b => "b", :a开发者_C百科 => "a"}

I get this output:

<tag a="a" b="b"/>

Is it possible to keep the ordering of the attributes in HAML?

I need this for a client-side code to display values in certain order and don't want to pass extra information on the client just to maintain ordering.


It's not possible with HAML because it's a hash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜