Sha256: 6e4cc68ea5ded3c4704d89e7ec6f3f369f32ed4d628c67a199d5d0036b963c55

Contents?: true

Size: 597 Bytes

Versions: 5

Compression:

Stored size: 597 Bytes

Contents

= form_for [@<%= singular_table_name %>.<%= nested_parent_name %>, @<%= singular_table_name %>] do |f|
  -if @<%= singular_table_name %>.errors.any?
    #error_explanation
      %h2= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
      %ul
        - @<%= singular_table_name %>.errors.full_messages.each do |msg|
          %li= msg

<% for attribute in attributes -%>
  .field
    = f.label :<%= attribute.name %>
    = f.<%= attribute.field_type %> :<%= attribute.name %>
<% end -%>
  .actions
    = f.submit 'Save'

Version data entries

5 entries across 5 versions & 1 rubygems

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