app/views/fields/select/_form.html.erb in administrate-0.18.0 vs app/views/fields/select/_form.html.erb in administrate-0.19.0
- old
+ new
@@ -17,29 +17,16 @@
<div class="field-unit__label">
<%= f.label field.attribute %>
</div>
<div class="field-unit__field">
- <% if field.selectable_options.first&.is_a?(Array) %>
- <%= f.select(
+ <%=
+ f.select(
field.attribute,
- options_from_collection_for_select(
+ options_for_select(
field.selectable_options,
- :last,
- :first,
field.data,
),
include_blank: field.include_blank_option
- ) %>
- <% else %>
- <%= f.select(
- field.attribute,
- options_from_collection_for_select(
- field.selectable_options,
- :to_s,
- :to_s,
- field.data,
- ),
- include_blank: field.include_blank_option
- ) %>
- <% end %>
+ )
+ %>
</div>