Sha256: 27f1bd60e0a661c7fe5babf65fcbfc431a927d0b059e1a19a2213dea0ca02ead

Contents?: true

Size: 895 Bytes

Versions: 4

Compression:

Stored size: 895 Bytes

Contents

= form_for @<%= singular_table_name %>, html: { class: "form-horizontal", role: "form" } do |f|
  -if @<%= singular_table_name %>.errors.any?
    .alert.alert-danger.alert-dismissable{role: "alert"}
      %button.close{type: "button", data: {dismiss: "alert"} }
        %span{aria: {hidden: "true"} } &times;
        %span.sr-only Close
      %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 -%>
  .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 -%>
  .form-group
    .col-sm-offset-2.col-sm-10
      = f.submit class: 'btn btn-primary'

Version data entries

4 entries across 2 versions & 2 rubygems

Version Path
sc_core-0.0.7 lib/generators/haml/scaffold/templates/_form.html.haml
sc_core-0.0.7 test/dummy/lib/templates/haml/scaffold/_form.html.haml
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/bootstrap-generators-3.3.4/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml
bootstrap-generators-3.3.4 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml