Sha256: 3bf61bf1b075257e8413c5c8df90d4adc5cfdb26b361582b8edbbb80d532733b
Contents?: true
Size: 954 Bytes
Versions: 18
Compression:
Stored size: 954 Bytes
Contents
<%# # 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_key, field.attribute %> </div> <div class="field-unit__field"> <%= f.select(field.attribute_key, nil, {}, multiple: true) do %> <%= options_for_select(field.associated_resource_options, field.selected_options) %> <% end %> </div>
Version data entries
18 entries across 18 versions & 2 rubygems