I have the following code which displays instructions in an ordered list. When it's rendered in the browser, it outputs all of the instructions at the end in a single line. Am I doing something wrong? See output below for example.
Code:
<% @recipe.instructions.each_line do |instruction| %>
<li><%= instruction %></li>
<% end %>
Output:
<p>
<b>Instructions:</b>
<ol>
<li>Roast garlic
</li>
<li>test
</li>
<li>eat icecream</li>
Roast garlic
test
eat icecream </ol>
</p>
Rails 3 rc2 ruby 1.9.2dev (2010-07-11 revision 28618)