Sha256: aed6597d635f2ff015ea639cbc94f06387a01c039572aaf93789294517b04588

Contents?: true

Size: 821 Bytes

Versions: 2

Compression:

Stored size: 821 Bytes

Contents

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

%table
  %tr
    <%- for attribute in attributes -%>
    %th <%= attribute.column.human_name %>
    <%- end -%>
  - for <%= singular_name %> in @<%= plural_name %>
    %tr
      <%- for attribute in attributes -%>
      %td&= <%= singular_name %>.<%= attribute.name %>
      <%- end -%>
      <%- if action? :show -%>
      %td= link_to 'Show', <%= singular_name %>
      <%- end -%>
      <%- if action? :edit -%>
      %td= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>)
      <%- end -%>
      <%- if action? :destroy -%>
      %td= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
      <%- end -%>

<%- if actions? :new -%>
%p= link_to "New <%= singular_name.titleize %>", new_<%= singular_name %>_path
<%- end -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
unittk-nifty-generators-0.1.7.1 rails_generators/nifty_scaffold/templates/views/haml/index.html.haml
unittk-nifty-generators-0.1.7.2 rails_generators/nifty_scaffold/templates/views/haml/index.html.haml