I've got a select type with 3 fixed options as a clock-type. I can't figure out how to get the clocktype(Which is in my group model) to function properly.
In my HTML it shows the select name as clocktype
. In stead of group[clocktype]
.
Here's my form:
<%= form_for(@group) do |f| %>
<% if @group.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@group.errors.count, "error") %> prohibited this group from being saved:</h2>
</div>
<% end %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<%= select_tag(:clocktype, options_for_select([['one', 1], ['two', 2], ['three', 3]])) %>
<div class="actions">
<%= f.submit %>
</div>
<% end %>