fields_for を使用して、オブジェクトの配列 (すべて同じモデル) を反復するにはどうすればよいですか? この配列には、current_user によって作成されたオブジェクトが含まれています。
私は現在持っています:
<%= f.fields_for :descriptionsbyuser do |description_form| %>
<p class="fields">
<%= description_form.text_area :entry, :rows => 3 %>
<%= description_form.link_to_remove "Remove this description" %>
<%= description_form.hidden_field :user_id, :value => current_user.id %>
</p>
<% end %>
しかし、:descriptionsbyuser をコントローラーで作成した配列に置き換えたい - @descriptionsFromCurrentUser
これは、Ryan Bate の「nested_form_for」にもあります。
どんなポインタでも大歓迎です!
アダム