How do you make text and variable in haml appear on same line?

我是研究僧i 提交于 2019-12-01 13:26:38

问题


I have this code and I want it to read as Volunteers Needed: 10 (event.numberofvolunteers value) on the same line. How can I do this without using css? I haven't found a specific post addressing this issue.

%td Volunteers Needed:
  = event.numberofvolunteers

回答1:


Try this:

%td= "Volunteers Needed: #{event.numberofvolunteers}"



回答2:


Best way to write this would be :

%td Volunteers Needed: #{event.numberofvolunteers}


来源:https://stackoverflow.com/questions/19309764/how-do-you-make-text-and-variable-in-haml-appear-on-same-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!