Sha256: ef9f9f3231ed84a4af044b5f5eb80d57b218ae78534b605f7b4bb225e966ba71

Contents?: true

Size: 847 Bytes

Versions: 6

Compression:

Stored size: 847 Bytes

Contents

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

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

%table
  %tr
    <%- for attribute in model_attributes -%>
    %th <%= attribute.human_name %>
    <%- end -%>
    %th Actions
  - for <%= singular_name %> in @<%= plural_name %>
    - tr_class = cycle 'even', 'odd'
    %tr{:class => tr_class}
      <%- for attribute in model_attributes -%>
      %td= <%= singular_name %>.<%= attribute.name %>
      <%- end -%>
      %td
      <%- if action? :show -%>
        = link_to "Show", <%= singular_name %>, :class => "button positive"
      <%- end -%>
      <%- if action? :edit -%>
        = link_to "Edit", edit_<%= singular_name %>_path(<%= singular_name %>), :class => "button"
      <%- end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

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