I had the same problem, I don’t know if my decision on the book was, but I decided that when creating a new parent he would be immediately saved in the database and then went directly to edit mode when he already has an identifier.
Location (parent - ) Photo ( ).
:
<%= link_to t('new_location'), locations_path(:user_id => current_user.id), :method => :post, class: 'btn btn-success' %>
_controller.rb . . , , jquery, , allready .
BR,
Luka