Sha256: 9118b7f3ddd0f2d7379c46281eca71e2f826938f80df916ffbeff3ffcfc8bf2d

Contents?: true

Size: 741 Bytes

Versions: 4

Compression:

Stored size: 741 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-xlarge'
<% end -%>
  .actions
    = f.submit :class => 'btn btn-primary'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootstrap-generators-2.2.2 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.2.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.1.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-2.0.4 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml