Given:
<%= f.fields_for :socials do |builder| %> <%= render :partial => "social_fields", :locals => { :f => builder} %> <% end %>
how can I get the counter / index inside the counter _social_fields.html.erb (for something on the last element)? social_fields_counter seems to be generated only if you explicitly pass: collection to render, but these are nested objects with accepts_nested_attributes_for: socials in the parent.
source share