<%#
# HasMany Form Partial

This partial renders an input element for belongs_to relationships.
By default, the input is a collection select box
that displays all possible records to associate with.
The collection select box supports multiple inputs,
and is augmented with [Selectize].

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of [Administrate::Field::HasMany][1].
  Contains helper methods for displaying a collection select box.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
[Selectize]: http://brianreavis.github.io/selectize.js
%>

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>

<div class="field-unit__field">
  <%= f.input_field field.attribute, as: :select,
                    collection: field.associated_resource_options,
                    selected: field.selected_options,
                    include_blank: true,
                    multiple: true %>
  <%= f.error field.attribute %>
  <%= f.hint field.attribute %>
</div>


<%#
# HasMany Form Partial

This partial renders an input element for belongs_to relationships.
By default, the input is a collection select box
that displays all possible records to associate with.
The collection select box supports multiple inputs,
and is augmented with [Selectize].

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of [Administrate::Field::HasMany][1].
  Contains helper methods for displaying a collection select box.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
[Selectize]: http://brianreavis.github.io/selectize.js
%>

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>

<div class="field-unit__field">
  <%= f.input_field field.attribute_key, as: :select,
                    collection: field.associated_resource_options,
                    selected: field.selected_options,
                    include_blank: true,
                    multiple: true %>
  <%= f.error field.attribute_key %>
  <%= f.hint field.attribute_key %>
</div>


Fix has many field attribute key
Fix has many field attribute key
