Sha256: 7f346e752574bf4372955417a89ca0dcda4ebf8cf08f62c532df0fc47b30ac56

Contents?: true

Size: 742 Bytes

Versions: 4

Compression:

Stored size: 742 Bytes

Contents

= form_for @<%= singular_table_name %>, :html => { :class => "form-horizontal" } 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

4 entries across 4 versions & 1 rubygems

Version Path
bootstrap-generators-2.3.2 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.3.1.2 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.3.1.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.3.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml