I'am을 저장하고 내가 선택한 업데이트 값은 내가 업데이트 할 때 레일 <code>select_tag</code>를 사용하여 select_tag 값을
를 저장되지 않은 태그 값이 첫 번째 옵션을 얻을edit.html.erb
<%= form_for(@name) do |f| %>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :lname%><br />
<%= f.text_field :lname%>
</div>
<div class="field">
<%= f.label :tag %><br />
<%= f.select :tag, "<option>1</option><option>2</option><option>3</option><option>4</option>".html_safe %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
솔루션
<%= f.collection_select(:tag, [1,2], :to_i, :to_s, :prompt => 'Categories') %>
코드 및 정보를 더 추가하십시오. – 99miles