So I have some old code that used to work and I am trying to resurrect it.
The controller has this:
@content="" for i in 0..w.size @content = @content + "<span id=\"w#{i}\" style='display:none'> #{w[i]} </span>" end @content = "<div style=\"font-size:100;color:blue;\">" + @content + "</div>"
@txt_divs = "" for i in 0..5 span = "" for j in 0..10 span = "#{span} <span id='sp#{i}_#{j}' style='display:none'> </
"
end div = "<div> #{span} </div>" @txt_divs << div << "\n" end
In the view I then do this:
<%= @content%>
<%= @txt_divs %>
but what's get generated is this as literal text and not what I wanted or what used to work:
<div style="font-size:100;color:blue;"><span id="w0" style='display:none'> Free </span><span id="w1" style='display:none'> Spirit </ span><span id="w2" style='display:none'> Boston </span><span id="w3" style='display:none'> </ span></div>
<div> <span id='sp0_0' style='display:none'> </ span> <span id='sp0_1' style='display:none'> </span> <span id='sp0_2' style='display:none'> </span> <span id='sp0_3' style='display:none'> </span> <span id='sp0_4' style='display:none'> </span> <span id='sp0_5' style='display:none'> </span> <span id='sp0_6' style='display:none'> </span> <span id='sp0_7' style='display:none'> </span> <span id='sp0_8' style='display:none'> </span> <span id='sp0_9' style='display:none'> </span> <span id='sp0_10' style='display:none'> </span> </div>
<div> <span id='sp1_0' style='display:none'> </ span> <span id='sp1_1' style='display:none'> </span> <span id='sp1_2' style='display:none'> </span> <span id='sp1_3' style='display:none'> </span> <span id='sp1_4' style='display:none'> </span> <span id='sp1_5' style='display:none'> </span> <span id='sp1_6' style='display:none'> </span> <span id='sp1_7' style='display:none'> </span> <span id='sp1_8' style='display:none'> </span> <span id='sp1_9' style='display:none'> </span> <span id='sp1_10' style='display:none'> </span> </div>
<div> <span id='sp2_0' style='display:none'> </ span> <span id='sp2_1' style='display:none'> </span> <span id='sp2_2' style='display:none'> </span> <span id='sp2_3' style='display:none'> </span> <span id='sp2_4' style='display:none'> </span> <span id='sp2_5' style='display:none'> </span> <span id='sp2_6' style='display:none'> </span> <span id='sp2_7' style='display:none'> </span> <span id='sp2_8' style='display:none'> </span> <span id='sp2_9' style='display:none'> </span> <span id='sp2_10' style='display:none'> </span> </div>
<div> <span id='sp3_0' style='display:none'> </ span> <span id='sp3_1' style='display:none'> </span> <span id='sp3_2' style='display:none'> </span> <span id='sp3_3' style='display:none'> </span> <span id='sp3_4' style='display:none'> </span> <span id='sp3_5' style='display:none'> </span> <span id='sp3_6' style='display:none'> </span> <span id='sp3_7' style='display:none'> </span> <span id='sp3_8' style='display:none'> </span> <span id='sp3_9' style='display:none'> </span> <span id='sp3_10' style='display:none'> </span> </div>
<div> <span id='sp4_0' style='display:none'> </ span> <span id='sp4_1' style='display:none'> </span> <span id='sp4_2' style='display:none'> </span> <span id='sp4_3' style='display:none'> </span> <span id='sp4_4' style='display:none'> </span> <span id='sp4_5' style='display:none'> </span> <span id='sp4_6' style='display:none'> </span> <span id='sp4_7' style='display:none'> </span> <span id='sp4_8' style='display:none'> </span> <span id='sp4_9' style='display:none'> </span> <span id='sp4_10' style='display:none'> </span> </div>
<div> <span id='sp5_0' style='display:none'> </ span> <span id='sp5_1' style='display:none'> </span> <span id='sp5_2' style='display:none'> </span> <span id='sp5_3' style='display:none'> </span> <span id='sp5_4' style='display:none'> </span> <span id='sp5_5' style='display:none'> </span> <span id='sp5_6' style='display:none'> </span> <span id='sp5_7' style='display:none'> </span> <span id='sp5_8' style='display:none'> </span> <span id='sp5_9' style='display:none'> </span> <span id='sp5_10' style='display:none'> </span> </div>