title: Browser shows json code when click cancel button in rails app
body: <p>I have a problem regarding ajax calls on my web pages. I have page on which I can upload images. It have two button upload and cancel. When I click cancel button then browser shows me json code in my browser. Here below is the output of the browser. Kindly help me how I can solve this issue.  Any help will be highly appreciated. Thanks in advance. I am using jquery-fileupload-rails gem to upload file.</p>
  
  <pre><code>{"files":[{"id":53,"name":"5.jpeg","size":27253,"message":"","url":"http://localhost:3000//picture/1/53/5.jpeg","delete_url":"http://localhost:3000/pictures/53","archived":false,"delete_type":"DELETE","contributor_name":"Johnny 
  Doe","contributor_avatar_url":"https://fetchframe.s3.amazonaws.com/default_ava.png"},{"id":52,"name":"2.jpeg","size":49100,"message":"","url":"http://localhost:3000//picture/1/52/2.jpeg","delete_url":"http://localhost:3000/pictures/52","archived":true,"delete_type":"DELETE","contributor_name":"Johnny
  </code></pre>