Sha256: d6e1be3eb893d76743a2b3d9e42a34c4cad28fc4fbc94ed847d1e7750e9a8b3e

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

= form_for @<%= singular_table_name %> do |f|
  -if @<%= singular_table_name %>.errors.any?
    .alert.alert-error
      %a.close{:href => "#", :"data-dismiss" => "alert"} ×
      %h4= "#{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 -%>
  .control-group
    = f.label :<%= attribute.name %>, :class => 'control-label'
    .controls
      = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'input-xxlarge'
<% end -%>
  .actions
    = f.submit :class => 'btn btn-primary'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap-generators-2.0.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.0.0 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml