문제

I am looking for a solution for a twice nested attributes form. The team has several player and each player has a few rounds. I added accept_nested_attributes in the models. This way did not worked for me.

 <% form_for(@team) do |team_fields| %>
     ...SOME FIELDS...
   <% team_fields.fields_for :players do |player_fields| %>...SOME FIELDS...

      <% player_fields.fields_for :rounds do |round_fields| %>
         <%= round_fields.text_field :message%>
      <%end%>
   <%end%>
 <%end%> 
도움이 되었습니까?

해결책

Try printing your calls to .fields_for.

<%= player_fields.fields_for :rounds do |round_fields| %>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top