Sha256: 8a49e61ad6c080447b68bd4711a2c018bd1d26f356950d62a2b1a80191c928c5

Contents?: true

Size: 791 Bytes

Versions: 5

Compression:

Stored size: 791 Bytes

Contents

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zoo-generators-0.1.5 lib/generators/zoo/scaffold/templates/views/haml/index.html.haml
zoo-generators-0.1.4 lib/generators/zoo/scaffold/templates/views/haml/index.html.haml
zoo-generators-0.1.3 lib/generators/zoo/scaffold/templates/views/haml/index.html.haml
zoo-generators-0.1.2 lib/generators/zoo/scaffold/templates/views/haml/index.html.haml
zoo-generators-0.1.1 lib/generators/zoo/scaffold/templates/views/haml/index.html.haml