Ruby on Rails - loading image from dropzone in a nested form

I want to upload multiple images using dropzone.js to a new message form (Rails 4) I can upload images smoothly, but I can not communicate with the new message because it does not yet have an identifier.

To do this, what should be the strategy?

Thank.

+4
source share
1 answer

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

+2

All Articles