Sha256: 3c072b09ee1a6b5e22d5cf9cca256d50c70e08ad3a5dbdd856b2e261afb624a5

Contents?: true

Size: 549 Bytes

Versions: 6

Compression:

Stored size: 549 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 |message|
          %li= message

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

Version data entries

6 entries across 5 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/haml-rails-2.1.0/lib/generators/haml/scaffold/templates/_form.html.haml
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/haml-rails-2.1.0/lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-2.1.0 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-2.0.1 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-2.0.0 lib/generators/haml/scaffold/templates/_form.html.haml
haml-rails-1.0.0 lib/generators/haml/scaffold/templates/_form.html.haml