user1276567
user1276567

Reputation:

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

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

Upvotes: 1

Views: 3303

Answers (2)

Lakhani Aliraza
Lakhani Aliraza

Reputation: 477

Best way to write this would be :

%td Volunteers Needed: #{event.numberofvolunteers}

Upvotes: 0

Marcelo De Polli
Marcelo De Polli

Reputation: 29281

Try this:

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

Upvotes: 4

Related Questions