Sha256: 8e58e7b932c1f8fb2cdfc01f13ba1471e65ff1df65f88b21f6a4a9b8ef6416eb

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 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

1 entries across 1 versions & 1 rubygems

Version Path
slim-rails-0.1.0 lib/generators/slim/scaffold/templates/_form.html.slim