<%= inputs_for f, :property, fn p_f -> %>
<h1>property index: <%= "??" %></h1>
<%= label p_f, :value %>
<%= text_input p_f, :value %>
<%= error_tag p_f, :value %>
<% end %>
how do I get the index of a field inside inputs_for
?
<%= inputs_for f, :property, fn p_f -> %>
<h1>property index: <%= "??" %></h1>
<%= label p_f, :value %>
<%= text_input p_f, :value %>
<%= error_tag p_f, :value %>
<% end %>
how do I get the index of a field inside inputs_for
?
p_f.index
will hold the index