%div{ class: "form-group#{model.errors[field] ? ' has-error' : ''}" }
  %label.col-sm-3.control-label{ for: attributes[:id] }= label
  .col-sm-9
    - type = attributes.delete(:type)
    - if type == 'select'
      - options = attributes.delete(:options)
      %select{attributes}
        - if attributes[:multiple]
          - options.each do |k,v| k ||= v;  v ||= k;
            %option{ value: k, selected: (model.send(field).map(&:id).include? k)}= v
        - else
          %option{ value: ""} -- Select One --
          - options.each do |k,v| k ||= v;  v ||= k;
            %option{ value: k, selected: [model[field].to_s, default].include?(k.to_s)}= v
    - elsif type == 'textarea'
      %textarea{attributes}= preserve(model[field])
    - else
      %input{attributes, type: type, value: model[field] || default}
    - if model.errors[field]
      %p.help-block.text-danger= model.errors[field].join(', ')

%div{ class: "form-group#{model.errors[field] ? ' has-error' : ''}" }
  - type = attributes.delete(:type)
  - if type != 'file'
    %label.col-sm-3.control-label{ for: attributes[:id] }= label
  .col-sm-9
    - if type == 'select'
      - options = attributes.delete(:options)
      %select{attributes}
        - if attributes[:multiple]
          - options.each do |k,v| k ||= v;  v ||= k;
            %option{ value: k, selected: (model.send(field).map(&:id).include? k)}= v
        - else
          %option{ value: ""} -- Select One --
          - options.each do |k,v| k ||= v;  v ||= k;
            %option{ value: k, selected: [model[field].to_s, default].include?(k.to_s)}= v
    - elsif type == 'textarea'
      %textarea{attributes}= preserve(model[field] || default)
    - else
      %input{attributes, type: type, value: model[field] || default}
    - if model.errors[field]
      %p.help-block.text-danger= model.errors[field].join(', ')

Allow for file type inputs
chore: Allow for file type inputs
