Sha256: 0b87d42eef6cb7d4ed206f06a139f488e986f0c40aff8550c88d5f7514556c7e

Contents?: true

Size: 640 Bytes

Versions: 4

Compression:

Stored size: 640 Bytes

Contents

= form_for @<%= singular_table_name %>, :html => { class: 'form-horizontal', role: 'form' } do |f|
  - if @<%= singular_table_name %>.errors.any?
    #error_explanation
      %h2= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")}"
      %ul
        - @<%= singular_table_name %>.errors.full_messages.each do |msg|
          %li= msg

<% for attribute in attributes -%>
  .form-group
    = f.label :<%= attribute.name %>, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.<%= attribute.field_type %> :<%= attribute.name %>, class: 'form-control'
<% end -%>
  .actions
    = f.submit 'Guardar', class: 'btn btn-default'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
scaffold-bootstrap3-1.0.1 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-1.0.0 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.9 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.8 lib/generators/haml/scaffold/templates/_form.html.haml