Is there any way to pass index
to activeadmin's nested form partial? The code I have:
<% variant.has_many :variant_currencies, allow_destroy: true, heading: false, new_record: 'Add new price modifier' do |variant_currency| %>
<% variant_currency.template.render partial: 'variant-currency-form', locals: { variant_currency: variant_currency, index: '??? how to pass it here ???' } %>
<% end %>
Normally, if I have an iteration, I pass index
like this:
<% Post.each_with_index do |post, index| %>
, but how can I tell activeadmin, that I want to have index
in that has_many
statement? Thanks ahead.