Wednesday, December 06, 2006

Rails: Snippet - View - Render a Object into a Table

Please don't get all bent out of shape. My Rails code isn't perfect, but I wanted to post some of my snippets that do work!

<% if (@base_coverages != nil) && (@base_coverages.length > 0) %>
<>
<% @base_coverages.each do |i| %>
<>">
  <><%= i.coverage_id %>< /td>
  <><%= i.external_description %>< /td>
< /tr>
<% end %>
< /tbody>< /table>
<% end %>

No comments: