On Jul 25, 2011, at 7:03 PM, Barney wrote:

Hello,
    When printing the data from a database table to an html table in
index.html.erb, there is a strange output in which the entire table is
printed sequentially and unformatted, followed by the actual formatted
data.  The formatted data is correct, along with its headers and some
links.
    After the html headers are printed in a table row:

<table>
 <tr>
   <th>First name</th>
...
then the table data is printed:

<%= @people.each do |person| %>
 <tr>
   <td><%= person.first_name %></td>
   <td><%= person.middle_name %></td>
...
and by the process of elimination, the offending line is <%=
@people.each do |person| %> as the table data dump occurs even when it

That should be <% @people.each do |person| %>

Or even better, <%- @people.each do |person| -%> which will not add an empty line to your output HTML.

Walter

is alone (except for the following <% end %>). But, of course, I can't
do without it or I wouldn't get all of the table data.
    How do I fix that line, or what is the replacement which still
iterates through the table?
    Thanks,
         Barney

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails- [email protected]. To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en .


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to