Sha256: dd224967178d09d12215e1131e8e32573706ced79f93efb5abf0fc9233a530e1
Contents?: true
Size: 979 Bytes
Versions: 20
Compression:
Stored size: 979 Bytes
Contents
<%# # HasMany Form Partial This partial renders an input element for has_many 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, for: "#{f.object_name}_#{field.attribute_key}" %> </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
20 entries across 20 versions & 3 rubygems