It is extremely hard to get the index value of the object in a fields_for or simple_fields_for in Rails 3.2 (Rails 4 has this feature).
You can add this monkey patch to get access to those index values.
One gotcha is that it will only have an index value if the object was not dynamically added (like with cocoon or nested forms)
<% f.fields_for :documents do |x| %>
<%= x.index %>
<% end %>
Related External Links: