知识点:index.html.erb的基本结构

Published on:
<div>
  <table>
    <thead>
      <tr>
        <td>#</td>
        <td>Title</td>
        <td>Description</td>
      </tr>
    </thead>
    <tbody>
      <% @groups.each do |group| %>
      <tr>
        <td>#</td>
        <td><%= link_to group.title, group %></td>
        <td><%= group.description %></td>
      </tr>
      <% end %>
    </tbody>
  </table>
</div>

Comments

comments powered by Disqus