Remotipart Gem : Response not executing ( create.js.erb )


Cause of this issue is the javascript goes in to a textarea tag and when these contents are extracted from the textarea double quotes(") gets converted to (&quot)

Solution ( create.js.erb ):
<% if remotipart_submitted? %>
    $('.form-wrapper').html("<%= j "#{render('form')}" %>");
<% else %>
    $('.form-wrapper').html("<%= j render('form') %>");
<% end %>

More details here
Issue on Github

Comments

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Difference between Validations, Callbacks and Observers