I have the following HAML code
//add some text
%div.text
<%= answer.text %>
The result in the browser is as such
How can I add quote marks to this text so that is shows "test remuse" instead?
I have the following HAML code
//add some text
%div.text
<%= answer.text %>
The result in the browser is as such
How can I add quote marks to this text so that is shows "test remuse" instead?
A more natural solution:
//add some text
%div.text
"#{answer.text}"
And I think you don't need a %div
, because .text
is a div
with class="text"
:
.text
"#{answer.text}"