Sha256: dfd0bfc0b4fee5cc124a454e7a0ebbd83e696e60757ba56f8b706c9991c8fce3

Contents?: true

Size: 925 Bytes

Versions: 5

Compression:

Stored size: 925 Bytes

Contents

%h1 Listing <%= plural_table_name %>

%table
  %tr
<% for attribute in attributes -%>
    %th <%= attribute.human_name %>
<% end -%>
    %th
    %th
    %th

  - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
    %tr
<% for attribute in attributes -%>
      %td= <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
      %td= link_to 'Show', [<%= singular_table_name %>.<%= nested_parent_name %>, <%= singular_table_name %>]
      %td= link_to 'Edit', edit_<%= nested_parent_name %>_<%= singular_table_name %>_path(<%= singular_table_name %>.<%= nested_parent_name %>, <%= singular_table_name %>)
      %td= link_to 'Destroy', [<%= singular_table_name %>.<%= nested_parent_name %>, <%= singular_table_name %>], :confirm => 'Are you sure?', :method => :delete

%br

= link_to 'New <%= human_name %>', new_<%= nested_parent_name %>_<%= singular_table_name %>_path(params[:<%= nested_parent_name %>_id])

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nested_scaffold-1.0.0 lib/generators/haml/templates/index.html.haml
nested_scaffold-0.2.1 lib/generators/haml/templates/index.html.haml
nested_scaffold-0.2.0 lib/generators/haml/templates/index.html.haml
nested_scaffold-0.1.0 lib/generators/haml/templates/index.html.haml
nested_scaffold-0.0.1 lib/generators/haml/templates/index.html.haml