title: Redirecting after Ajax post
body: <p>I want the success on ajax post to go to the home page. For some reason I keep doing it wrong. Any idea what I should do to fix this?</p>
  
  <pre><code>window.APP_ROOT_URL = "&lt;%= root_url %&gt;";
  </code></pre>
  
  <p>Ajax</p>
  
  <pre><code>$.ajax({ url: '#{addbank_bankaccts_path}',
   type: 'POST',
   beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', '#{form_authenticity_token}')},
   dataType: "json",
   data: 'some_uri=' + response.data.uri ,
   success: function(APP_ROOT_URL) {
        window.location.assign(APP_ROOT_URL);
    }
  });
  </code></pre>