Sha256: cfcd7a9bfaa92cd7a2c56d8f982fe3147fe3595c02e3b53aea081107320e9995

Contents?: true

Size: 540 Bytes

Versions: 5

Compression:

Stored size: 540 Bytes

Contents

= form_for @<%= 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
haml-rails-0.3.4 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-0.3.3 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-0.3.2 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-0.3.1 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-0.3 lib/generators/haml/scaffold/templates/_form.html.haml