📜  rails 中的复选框标记 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:03.204000             🧑  作者: Mango

代码示例2
<%= form_tag(medication_select_path, method: 'put', :id => 'medication-select') do %>
  <% @medications.each do |medication| %>
    <%= check_box_tag "medications[]", medication.id  -%>
  <% end %>
<% end %>