Sha256: f29e16dfb0718178578ee0288aa76eec4494e2deae20e326f47d5d8d5e12cd29

Contents?: true

Size: 848 Bytes

Versions: 1

Compression:

Stored size: 848 Bytes

Contents

<h1><%= full_controller_const %> controller, index action</h1>

<p>Edit this file in <tt>app/views/<%= controller_file_name %>/index.html.erb</tt></p>

<table>
  <tr>
<% for property in properties.reject{|p| p.lazy?} -%>
    <th><%= Extlib::Inflection.humanize(property.field) %></th>
<% end -%>
  </tr>

<%% for <%= singular_model %> in @<%= plural_model %> %>
  <tr>
<% for property in properties.reject{|p| p.lazy?} -%>
    <td><%%=h <%= singular_model %>.<%= property.getter %> %></td>
<% end -%>
    <td><%%= link_to 'Show', url(:<%= singular_model %>, <%= singular_model %>) %></td>
    <td><%%= link_to 'Edit', url(:edit_<%= singular_model %>,  <%= singular_model %>) %></td>
    <td><%%= delete_button :<%= singular_model %>, <%= singular_model %> %></td>
  </tr>
<%% end %>
</table>

<%%= link_to 'New', url(:new_<%= singular_model %>) %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
merb_datamapper-0.9.3 datamapper_generators/resource_controller/templates/app/views/%controller_file_name%/index.html.erb