If I understand the question, you are editing an order and have a fields_for
for the payments and want to get the payment instance associated with the fields_for
. You can do that by calling object
like below
= form_for @order do |f|
= f.fields_for :payments do |ff|
- payment_for_this_fields_for = ff.object # current payment object