Coherent
Coherent

Reputation: 2113

Remove double quotes from ruby loop in rails

I am working on a ruby on rails web app and in my view I have the following code:

<div id="glmol02" style="width: 600px; height: 400px; background-color: black;"></div> <textarea id="glmol02_src" style="display: none;">
<% @name.coords.each_with_index do |coord, i| %>
  <%= coord.atom %>
<% end %>
END
</textarea>

When I look at my web page, there are double quotes around the whole for loop, how can I remove those double quotes?

<div></div>
<textarea>
" entry1
  entry2
  ...
  entry100 "
</textarea>

Thanks so much!

Upvotes: 0

Views: 156

Answers (1)

mabako
mabako

Reputation: 1183

Chrome's inspector (for example, other browsers might do this too) adds pseudo-quotes to elements if they're beginning or ending with a whitespace/tabs/etc to indicate their presence. Similar behaviour can apply to <p> and <div>.

Have you checked the website's actual source with CTRL+U, or are you just using the inspector?

Upvotes: 1

Related Questions