在我的应用程序中,我为简单表单嵌套资源:
<%= simple_form_for @member, url: "/assessments/update_invite/#{@token}", method: :post do |f| %>
<%= f.simple_fields_for :assessment_procedure_results do |g| %>
<%= g.object.skill.skill_group.name %>
<%= g.input :self_estimation %>
<%= g.input :skill_id, as: :hidden %>
<%= g.input :assessment_procedure_member_id, as: :hidden %>
<% end %>
<%= f.button :submit%>
<% end %>
用我的代码:
**Skill group 1**
Programming <input here>
**Skill group 1**
Testing <input here>
**Skill group 1**
Designing <input here>
如何按SkillGroup
分组字段,如:
**Skill group 1**
Programming <input here>
Testing <input here>
Designing <input here>
谢谢!