Sha256: 3b9ffc95de36613c3861202ee544d9ae660fea0479624cb670487b6afb360472

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 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= h <%= singular_name %>.<%= attribute.name %>
      <%- end -%>
      <%- if action? :show -%>
      %td= link_to 'Show', [:admin, <%= singular_name %>]
      <%- end -%>
      <%- if action? :edit -%>
      %td= link_to 'Edit', edit_admin_<%= singular_name %>_path(<%= singular_name %>)
      <%- end -%>
      <%- if action? :destroy -%>
      %td= link_to 'Delete', [:admin, <%= singular_name %>], :confirm => 'Are you sure?', :method => :delete
      <%- end -%>

<%- if actions? :new -%>
%br
%p= link_to "Add <%= singular_name.titleize %>", new_admin_<%= singular_name %>_path
<%- end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ghart-nifty-generators-0.3.0.1 rails_generators/nifty_admin_scaffold/templates/views/haml/index.html.haml