Closed urielhdz closed 6 years ago
This is meant to fix errors in Rails 5
This fixes and works with Rails 5 for me! Thanks @urielhdz
Hi there! Any news?
This change breaks current behavior, because textarea wrapper's data-type will be always be Mime[:html]
.
https://github.com/JangoSteve/remotipart/blob/master/lib/remotipart/render_overrides.rb#L19
88d9a7d55bde66acb6cf3a3c6036a5a1fc991d5e have solved this, I believe.
Fixe the ActionDispatch::IllegalStateError (header already sent) error produced by changing the response type on line 18 of the render_with_remotipart method, which also was using a deprecated way to access mime types.
The error didn't prevented the library from uploading the file, but did produced an error at the response moment which prevented the response for being properly executed
Note: I have manually tested the changes but I don't have enough knowledge on AJAX testing to create automatic tests, also it's possible that my solution is not "the rails way" as this is my first public contribution.