Hyphen/dash attributes instead of underscore in Haml -
doing this
li{ id: ["article", article.id] }
results in
# => <li id="article_1"></li>
i want have output instead, while using similar dynamic syntax, rather string parsing.
# => <li id="article-1"></li>
without doing
%li{ id: "entry-#{entry.id}" }
it seems cannot this. hope haml realizes people don't underscores element names, , naysayers object implementing on grounds of complexity realize they're arguing status quo.
in meanwhile, can this, more manual.
li{ id: "article-#(article.id)" }
haml
No comments:
Post a Comment