Sha256: 3f3b6f7af030848bbe71853c3f0ca7eb52630edda5d8cf50ba1bb92428a2109d

Contents?: true

Size: 787 Bytes

Versions: 30

Compression:

Stored size: 787 Bytes

Contents

<%#
# BelongsTo 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.

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of [Administrate::Field::BelongsTo][1].
  Contains helper methods for displaying a collection select box.

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

<div class="field-unit__label">
  <%= f.label field.permitted_attribute %>
</div>
<div class="field-unit__field">
  <%= f.select(field.permitted_attribute) do %>
    <%= options_for_select(field.associated_resource_options, field.selected_option) %>
  <% end %>
</div>

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
administrate-0.14.0 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-22.0.0 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-0.21.0 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-0.20.0 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-0.14.0 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-0.13.2 app/views/fields/belongs_to/_form.html.erb
viniBaxterDesk-0.13.1 app/views/fields/belongs_to/_form.html.erb
administrate-0.13.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.12.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.11.0 app/views/fields/belongs_to/_form.html.erb
semantic-administrate-0.10.1 app/views/fields/belongs_to/_form.html.erb
semantic-administrate-0.10.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.10.0 app/views/fields/belongs_to/_form.html.erb
semantic-administrate-0.1.1 app/views/fields/belongs_to/_form.html.erb
administrate-0.9.0 app/views/fields/belongs_to/_form.html.erb
semantic-administrate-0.1.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.8.1 app/views/fields/belongs_to/_form.html.erb
administrate-0.8.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.7.0 app/views/fields/belongs_to/_form.html.erb
administrate-0.6.0 app/views/fields/belongs_to/_form.html.erb