Sha256: 147e244a952666f30d3e921fc74b8871b19201b9efdbec66dea621a30176123e

Contents?: true

Size: 1.11 KB

Versions: 27

Compression:

Stored size: 1.11 KB

Contents

div.page-header
  h1 Listing <%= plural_table_name %>

table.table.table-striped
  thead
    tr
      th ID
  <% attributes.each do |attribute| -%>
    th <%= attribute.human_name %>
  <% end -%>
    th Actions

  tbody
  - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
    tr
      td= link_to_if can?(:show, <%= singular_table_name %>), <%= singular_table_name %>.id, <%= singular_table_name %>_path(<%= singular_table_name %>)
<% attributes.each do |attribute| -%>
      td= <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
      td
        - if can? :edit, <%= singular_table_name %>
          = link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-mini'
          '
        - if can? :destroy, <%= singular_table_name %>
          = link_to 'Destroy', <%= singular_table_name %>_path(<%= singular_table_name %>), method: :delete, data: { confirm: "Are you sure?" }, class: 'btn btn-mini btn-danger'

- if can? :create, <%= singular_table_name.classify %>
  = link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path, class: 'btn btn-primary'

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
raygun-0.0.34 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.34.pre2 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.33 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.32 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.31 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.30 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.29 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.28 rails_32/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.27 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.26 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.25 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.24 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.23 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.22 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.21 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.18 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.17 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.16 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.15 app_prototype/lib/templates/slim/scaffold/index.html.slim
raygun-0.0.14 app_prototype/lib/templates/slim/scaffold/index.html.slim