Accessing nested model attributes inside a fields_for without using FormBuilder

后端 未结 2 1318
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 14:14

I have a Rails form that is being used for creating and editing a model with a has_many relationship. I\'m very familiar with typical forms with nested models, but my current pr

2条回答
  •  天命终不由人
    2021-02-05 14:48

    Not sure if this is what you need, but couldn't you include the model data as a local? like:

    <%= render :partial => 'customer_image_show', :locals => { :f => images_form, :customer_image => @customer_image } %>
    

提交回复
热议问题