Sha256: 9963de10a64be93ca75425b1377de586c1625bfd21716b7fb8fc008062552fcb

Contents?: true

Size: 880 Bytes

Versions: 2

Compression:

Stored size: 880 Bytes

Contents

<h1>Listing <%= plural_table_name %></h1>

<table>
  <thead>
    <tr>
  <% attributes.each do |attribute| -%>
      <th><%= attribute.human_name %></th>
  <% end -%>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %>
  <% attributes.each do |attribute| -%>
    <% if attribute.name == 'name' %>
      <td><%%= link_to_show <%= singular_table_name %> %></td>
    <% else %>
      <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
    <% end -%>
  <% end -%>
      <td><%%= link_to_show <%= singular_table_name %>, i18n: true %></td>
      <td><%%= link_to_edit <%= singular_table_name %> %></td>
      <td><%%= link_to_destroy <%= singular_table_name %> %></td>
    <%% end %>
  </tbody>
</table>

<br />

<%%= link_to_new <%= class_name %> %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_to_action-0.3.0 lib/generators/link_to_action/templates/index.html.erb
link_to_action-0.2.5 lib/generators/link_to_action/templates/index.html.erb