Whenever the following code runs i get extra output on the page which looks like the garbage on the bottom. I have tried to see if it is in my migrations or function calls, but they all seem to be pretty clean (not much too f.name). If needed I can provide a copy of my migrations and schema.
<%= @subject.Name %>
<%= @subject.formulas.each do |f| %>
<div class="entry">
<h3><%= f.name %></h3>
</div>
<% end %>
The extra output is:
开发者_如何学JAVA[#<Formula id: 2, name: "Pythagorean Theorem", description: "n any right triangle, the area of the square whose ...", formula: "a^2+b^2=c^2", created_at: "2011-05-17 03:18:44", updated_at: "2011-05-17 03:18:44">]
Change
<%= @subject.formulas.each do |f| %>
to
<% @subject.formulas.each do |f| %>
精彩评论