the HTML.ERB like this, and then it generate a html, it. the <table>
indent not it shoud be, and the second <tr> also indent not the noraml.
why it generate a html like that?

second, I think everytme I should check empty object like object.blank?
and then iterate the object is very ugly. how to change this ugly
behavior?

==========
      <h1>h1_title</h1>
      <% unless @obs.blank? -%>
      <table border="0" cellspacing="0" class="normal_table">
        <tr>
          <th>data</th>
          <th>state</th>
          <th>number</th>
          <th>operation</th>
        </tr>
        <% @obs.each do |ob| -%>
        <tr>
          <td><%= ob.created_at %></td>
          <td><%= ob.state %></td>
          <td class="info">ob.number</td>
          <td>ob.operation</td>
        </tr>
        <% end -%>
      </table>
      <% end -%>

=============================================



        <h1>h1_title</h1>
            <table border="0" cellspacing="0" class="normal_table">
        <tr>
          <th>data</th>
          <th>state</th>
          <th>number</th>
          <th>operation</th>

        </tr>
                <tr>
          <td>2010-07-27</td>
          <td>initialize</td>
          <td class="info">1</td>
          <td>un_done</td>
        </tr>

              </table>
====================
-- 
Posted via http://www.ruby-forum.com/.

-- 
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