Sha256: 9b4ba2329a8de0ec361e935d10c0b05a2ebb43bfdc4623508f8121e8784f573a

Contents?: true

Size: 1.28 KB

Versions: 7

Compression:

Stored size: 1.28 KB

Contents

<script>
  LiveRecord.helpers.loadRecords({modelName: '<%= singular_table_name.camelcase %>'})
</script>
<p id="notice"><%%= notice %></p>

<h1><%= plural_table_name.titleize %></h1>

<table>
  <thead>
    <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
      <tr data-live-record-destroy-from='<%= singular_table_name.camelcase %>-<%%= <%= singular_table_name %>.id %>'>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
        <td data-live-record-update-from='<%= singular_table_name.camelcase %>-<%%= <%= singular_table_name %>.id %>-<%= attribute.name %>'><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
        <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
        <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
        <td><%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <%% end %>
  </tbody>
</table>

<br>

<%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
live_record-0.1.2 lib/live_record/generators/templates/index.html.erb
live_record-0.1.1 lib/live_record/generators/templates/index.html.erb
live_record-0.1.0 lib/live_record/generators/templates/index.html.erb
live_record-0.0.4 lib/live_record/generators/templates/index.html.erb
live_record-0.0.3 lib/live_record/generators/templates/index.html.erb
live_record-0.0.2 lib/live_record/generators/templates/index.html.erb
live_record-0.0.1 lib/live_record/generators/templates/index.html.erb