问题
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