Sha256: b832d98892764082d2dbcf101fae803fa7f505ea0ad5a6a7b53890b4dd04ee55

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

<h2><%= table_name %></h2>

<%% if @<%= table_name %>.count > 0 %>
<table id='table:<%%= controller_name %>'>
  <thead>
    <% attributes.each do |attribute| -%>
      <th><%= attribute.name.humanize %></th>
    <% end -%>
  </thead>

  <tbody>
    <%% @<%= table_name %>.each do |<%= table_name[0] %>| %>
      <%%= content_tag_for(:tr, <%= table_name[0] %>) do %>
        <% attributes.each do |attribute| -%>
          <td><%%= <%= table_name[0] %>.<%= attribute.name %> %></td>
        <% end -%>
      <%% end %>
    <%% end %>
  </tbody>
</table>
<%% end %>

<div class='model-actions'>
  <%%= link_to 'New <%= name %>', new_manifest_<%= name.underscore %>_path %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
manifest-rails-0.2.3 lib/generators/manifest/data_type/templates/index.html.erb
manifest-rails-0.2.2 lib/generators/manifest/data_type/templates/index.html.erb