Sha256: d2800eb2c902d512a14a96a1a44297d07aa3906a5092beeed2ca25c98c9bd53a

Contents?: true

Size: 731 Bytes

Versions: 4

Compression:

Stored size: 731 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_for_select(
        field.selectable_options,
        field.data,
      ),
      include_blank: field.include_blank_option
    )
  %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
administrate-1.0.0.beta1 app/views/fields/select/_form.html.erb
administrate-0.20.1 app/views/fields/select/_form.html.erb
administrate-0.20.0 app/views/fields/select/_form.html.erb
administrate-0.19.0 app/views/fields/select/_form.html.erb