I am using cocoon gem cocoon to render out my file fields in the HTML dynamically so I can send them back to rails. The problem is between cocoon and remotipart. The problem being when pictures are sent with a valid or invalid form submission and you want to rerender the form partial to create pictures again. Whether it be a valid or invalid form submission if the form is submitted with pictures added with cocoon somewhere in the call back to the browser my response is not being inserted into the div its supposed to. The response is not inserted in to the HTML document however the entire response is in browser response body upon return. The response is valid, ie everything inside the <form> tags when pasted in to the document from response body shows exactly as it should but is not inserted into the document. THIS DOES NOT HAPPEN when I render a different view eg index where cocoon is not present so somewhere when cocoon is attached back to the view something is going wrong eg when remotipart does its thing and remotipart-submitted = true when you add pictures in server output something happens.
There are no js errors in the console.
I have narrowed down the problem to be in the form where fields_for is used with cocoon.
I was wondering if anyone could help me troubleshoot this?
I am using cocoon gem cocoon to render out my file fields in the HTML dynamically so I can send them back to rails. The problem is between cocoon and remotipart. The problem being when pictures are sent with a valid or invalid form submission and you want to rerender the form partial to create pictures again. Whether it be a valid or invalid form submission if the form is submitted with pictures added with cocoon somewhere in the call back to the browser my response is not being inserted into the div its supposed to. The response is not inserted in to the HTML document however the entire response is in browser response body upon return. The response is valid, ie everything inside the
<form>
tags when pasted in to the document from response body shows exactly as it should but is not inserted into the document. THIS DOES NOT HAPPEN when I render a different view eg index where cocoon is not present so somewhere when cocoon is attached back to the view something is going wrong eg when remotipart does its thing andremotipart-submitted = true
when you add pictures in server output something happens.There are no js errors in the console.
I have narrowed down the problem to be in the form where fields_for is used with cocoon.
I was wondering if anyone could help me troubleshoot this?
Thanks.