Sha256: b6783ffb7eecc83d541b81da08b1b208eb98d62f85df14e76c0055e2de7cc94f

Contents?: true

Size: 715 Bytes

Versions: 8

Compression:

Stored size: 715 Bytes

Contents

<%#
# Select Form Partial

This partial renders a selectable text attribute,
to be displayed on a resource's edit form page.

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of [Administrate::Field::Select][1].
  A wrapper around the attribute pulled from the database.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Select
%>

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>
<div class="field-unit__field">
  <%= f.select(
    field.attribute,
    options_from_collection_for_select(
      field.selectable_options,
      :to_s,
      :to_s,
      field.data.presence,
    )
  ) %>
</div>

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
viniBaxterDesk-22.0.0 app/views/fields/select/_form.html.erb
viniBaxterDesk-0.21.0 app/views/fields/select/_form.html.erb
viniBaxterDesk-0.20.0 app/views/fields/select/_form.html.erb
viniBaxterDesk-0.14.0 app/views/fields/select/_form.html.erb
viniBaxterDesk-0.13.2 app/views/fields/select/_form.html.erb
viniBaxterDesk-0.13.1 app/views/fields/select/_form.html.erb
administrate-0.13.0 app/views/fields/select/_form.html.erb
administrate-0.12.0 app/views/fields/select/_form.html.erb