Sha256: 9f89dbcd57483f465080aec369ba65cc22ebe2509d721c56cc2120e57051444d

Contents?: true

Size: 684 Bytes

Versions: 5

Compression:

Stored size: 684 Bytes

Contents

= form_for @<%= singular_table_name %>, :html => { class: 'form-horizontal', role: 'fordb/migrate/20131119172026_create_diseƱos.rbm' } 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

5 entries across 5 versions & 1 rubygems

Version Path
scaffold-bootstrap3-0.0.6 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.5 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.4 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.2 lib/generators/haml/scaffold/templates/_form.html.haml
scaffold-bootstrap3-0.0.1 lib/generators/haml/scaffold/templates/_form.html.haml