Sha256: d89a1a09b4fd0eff74cc8341b207a8d03563c6920c8c5fe3cd6c9e6f64de66c3

Contents?: true

Size: 915 Bytes

Versions: 4

Compression:

Stored size: 915 Bytes

Contents

<%% title "<%= plural_name.titleize %>" %>

<table>
  <tr>
  <%- for attribute in model_attributes -%>
    <th><%= attribute.model_name.human.titleize %></th>
  <%- end -%>
  </tr>
  <%% for <%= instance_name %> in @<%= instances_name %> %>
    <tr>
    <%- for attribute in model_attributes -%>
      <td><%%= <%= instance_name %>.<%= attribute.name %> %></td>
    <%- end -%>
    <%- if action? :show -%>
      <td><%%= link_to "Show", <%= item_path %> %></td>
    <%- end -%>
    <%- if action? :edit -%>
      <td><%%= link_to "Edit", <%= item_path :action => :edit %> %></td>
    <%- end -%>
    <%- if action? :destroy -%>
      <td><%%= link_to "Destroy", <%= item_path %>, :confirm => 'Are you sure?', :method => :delete %></td>
    <%- end -%>
    </tr>
  <%% end %>
</table>

<%- if action? :new -%>
<p><%%= link_to "New <%= singular_name.titleize %>", <%= item_path :action => :new %> %></p>
<%- end -%>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aslon_scaffold-0.0.15 lib/generators/nifty/scaffold/templates/views/erb/index.html.erb
aslon_scaffold-0.0.14 lib/generators/nifty/scaffold/templates/views/erb/index.html.erb
aslon_scaffold-0.0.13 lib/generators/nifty/scaffold/templates/views/erb/index.html.erb
aslon_scaffold-0.0.12 lib/generators/nifty/scaffold/templates/views/erb/index.html.erb