Update on file upload using ajax.
While uploading the file with remote true,.. the system would require us to specify authenticity token. Otherwise, you will get error stating invalid authenticity token.
<%= nested_form_for [@project, @test_run, @test_runs_test_case], remote:true, authenticity_token: true do |f| %>
Internally the request is sent as HTML instead of xhr when the params contains any new attachment.
if (remote) {