Sha256: 4b44806b5d39950b781f3c3a2acaf68c3058b67f49fc733e2da69e272c058188

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

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

<%% if @<%= table_name %>.count > 0 %>
<table>
  <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.1 lib/generators/manifest/data_type/templates/index.html.erb
manifest-rails-0.2.0 lib/generators/manifest/data_type/templates/index.html.erb