Sha256: 5b3fc2f28412d814f9bd32fc031cfb90fe053a8aa959b399dcf89a3708ae0170

Contents?: true

Size: 1.25 KB

Versions: 9

Compression:

Stored size: 1.25 KB

Contents

<h1><%%= translate(:listing, :default => "Listing {{model}}", :model => <%= class_name %>.human_name(:count => @<%= plural_name %>.size), :count => @<%= plural_name %>.size, :scope => [:railties, :scaffold]) %></h1>

<table>
  <tr>
<% for attribute in attributes -%>
    <th><%%= <%= class_name %>.human_attribute_name('<%= attribute.column.name %>') %></th>
<% end -%>
  </tr>

<%% for <%= singular_name %> in @<%= plural_name %> %>
  <tr>
<% for attribute in attributes -%>
    <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
<% end -%>
    <td><%%= link_to translate(:show, :default => 'Show', :scope => [:railties, :scaffold]), <%= singular_name %> %></td>
    <td><%%= link_to translate(:edit, :default => 'Edit', :scope => [:railties, :scaffold]), edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to translate(:destroy, :default => 'Destroy', :scope => [:railties, :scaffold]), <%= singular_name %>, :confirm => translate(:confirmation, :default => 'Are you sure?', :scope => [:railties, :scaffold]), :method => :delete %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to translate(:new, :default => "New {{model}}", :model => <%= class_name %>.human_name, :scope => [:railties, :scaffold]), new_<%= singular_name %>_path %>

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
amatsuda-i18n_generators-0.2.0 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.3.0 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.3.1 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.4.0 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.4.1 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.5.0 generators/i18n_scaffold/templates/view_index.html.erb
amatsuda-i18n_generators-0.6.0 generators/i18n_scaffold/templates/view_index.html.erb
i18n_generators-0.8.1 generators/i18n_scaffold/templates/view_index.html.erb
i18n_generators-0.8.0 generators/i18n_scaffold/templates/view_index.html.erb