Sha256: bd655aab0b6f0a342873a2a8ac0b97bc22af9def5decedc1a9b9f22b86a847b7

Contents?: true

Size: 973 Bytes

Versions: 4

Compression:

Stored size: 973 Bytes

Contents

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

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

<%% @<%= plural_table_name %>.each{ |<%= singular_table_name %>| %>
  <tr>
<% attributes.each do |attribute| -%>
    <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
    <td><%%= link_to t( "menu.show" ), <%= singular_table_name %>_path( <%= singular_table_name %> ) %></td>
    <td><%%= link_to t( "menu.edit" ), edit_<%= singular_table_name %>_path( <%= singular_table_name %> ) %></td>
    <td><%%= link_to t( "menu.destroy" ), <%= singular_table_name %>_path( <%= singular_table_name %> ), method: :delete, data: { confirm: '本当に削除してよろしいですか?' } %></td>
  </tr>
<%% } %>
</table>

<br />

<%%= link_to t( "menu.new" ), new_<%= singular_table_name %>_path %>

<br />
<br />

<%%= link_to t( "menu.top" ), :root %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
custom-template-0.1.8 lib/custom-template/templates/erb/scaffold/index.html.erb
custom-template-0.1.7 lib/custom-template/templates/erb/scaffold/index.html.erb
custom-template-0.1.6 lib/custom-template/templates/erb/scaffold/index.html.erb
custom-template-0.1.5 lib/custom-template/templates/erb/scaffold/index.html.erb