Sha256: 824587f18721056ad72448c3bda266f4ec0f50f1f6f43b26523c180be5ae3724
Contents?: true
Size: 849 Bytes
Versions: 16
Compression:
Stored size: 849 Bytes
Contents
<%# # BelongsToSearch Form Partial This partial renders an search input element for belongs_to relationships. By default, the input is a collection select box that displays all possible records to associate with. ## Local variables: - `f`: A Rails form generator, used to help create the appropriate input fields. - `field`: An instance of [BelongsToWithSearchField]. Contains helper methods for displaying a collection select box. %> <div class="field-unit__label"> <%= f.label field.permitted_attribute %> </div> <div class="field-unit__field"> <%= f.select(field.permitted_attribute, nil, {}, 'data-url': polymorphic_url([namespace, field.associated_class], format: :json)) do %> <%= options_for_select(field.associated_resource_options, field.selected_option) %> <% end %> </div>
Version data entries
16 entries across 16 versions & 4 rubygems