<%= form_for adonis ||= Adonis.new do |f| %>
    <% if adonis.id %>
        <%= f.label :id %>
        <%= f.text_field :id, disabled: true %>
    <% end %>

    <%= f.label :hostname %>
    <%= f.text_field :hostname %>

    <%= f.label :identifier %>
    <%= f.text_field :identifier %>

    <%= f.label :inventory_number %>
    <%= f.text_field :inventory_number %>

    <%= f.label :model %>
    <%= select_tag :model_id, options_from_collection_for_select(Model.all, 'id', 'name', adonis.model) %>

    <%= f.label :status %>
    <%= select_tag :status_id, options_from_collection_for_select(Status.all, 'id', 'name', adonis.status) %>

    <%= f.label :ipv4_gateway %>
    <%= f.text_field :ipv4_gateway %>

    <%= f.label :ipv6_gateway %>
    <%= f.text_field :ipv6_gateway %>

    <%= f.label :root_password %>
    <%= f.text_field :root_password %>

    <%= f.label :admin_password %>
    <%= f.text_field :admin_password %>

    <%= f.label :deploy_password %>
    <%= f.text_field :deploy_password %>

    <%= f.submit t 'views.save' %>
<% end %>

<%= form_for adonis ||= Adonis.new do |f| %>
    <% if adonis.id %>
        <%= f.label :id %>
        <%= f.text_field :id, disabled: true %>
    <% end %>

    <%= f.label :hostname %>
    <%= f.text_field :hostname %>

    <%= f.label :identifier %>
    <%= f.text_field :identifier %>

    <%= f.label :inventory_number %>
    <%= f.text_field :inventory_number %>

    <%= f.label :model %>
    <%= select_tag :model_id,
                   options_from_collection_for_select(Model.all, 'id', 'name', adonis.model ? adonis.model.id : nil),
                   include_blank: true %>

    <%= f.label :status %>
    <%= select_tag :status_id,
                   options_from_collection_for_select(Status.all, 'id', 'name', adonis.status ? adonis.status.id : nil),
                   include_blank: true %>

    <%= f.label :ipv4_gateway %>
    <%= f.text_field :ipv4_gateway %>

    <%= f.label :ipv6_gateway %>
    <%= f.text_field :ipv6_gateway %>

    <%= f.label :root_password %>
    <%= f.text_field :root_password %>

    <%= f.label :admin_password %>
    <%= f.text_field :admin_password %>

    <%= f.label :deploy_password %>
    <%= f.text_field :deploy_password %>

    <%= f.submit t 'views.save' %>
<% end %>

Fix select in Adonis' form
Fix select in Adonis' form

The form for Adonis servers has two drop down menus, one each for the server's model and status. The select tag has been extended to:

a) preselect the current model and status of the server
b) allow blank as an option
