Another approach, tested, should work:
= "=" * 10
Question
In Rails with HAML, I want to create a simple line of spaces: ====== on the page, with variable length. However, the following code:
- 10.times do
\=
renders the following:
= = = = = = = = = =
I want to get rid of the spaces in the middle of these equals signs, but I don't really have any idea how. I know with ERB you can use
<%= 10.times do -%>=<% end %>
but I'm having trouble figuring out how to do it here.
Solution
Another approach, tested, should work:
= "=" * 10
OTHER TIPS
This should work
- 10.times do
&= "="