title: $.params vs JSON.stringify on Rails ajax
body: <p>When trying to make an AJAX call to Rails, I have some question about <code>JSON.stringify()</code> and <code>$.param</code>
  This code work</p>
  
  <pre><code>$.ajax({
    url: '/api/v1/login',
    dataType: 'application/json',
    method: 'post',
    data: $.param({"user": attrs}),
    success: function(a,b,c) {
      alert(JSON.parse(b));
    }
  });
  </code></pre>
  
  <p>This code doesn't</p>
  
  <pre><code>  $.ajax({
      url: '/api/v1/login',
      dataType: 'application/json',
      method: 'post',
      data: $.JSON.stringify({"user": attrs}),
      success: function(a,b,c) {
        alert(JSON.parse(b));
      }
    });
  </code></pre>
  
  <p><code>$.param({"user": attrs})</code> returns <code>user%5Busername%5D=ABC&amp;user%5Bpassword%5D=123456</code>
  <code>JSON.stringify({"user": attrs})</code> returns <code>{"user":{"username":"triet","password":"123456"}}</code></p>
  
  <p>I think <code>JSON.stringify</code> should work, but when I consult the rails console, it gives me <code>{"{\"user\":{\"username\":\"triet\",\"password\":\"123456\"}}"=&gt;"[FILTERED]"}</code>.</p>
  
  <p>Could anyone tell me why there is a [FILTERED] part? I couldn't find any doc mentions about it. Thank you</p>