title: Rails - render JavaScript with AJAX or redirect
body: <p>I have a rails remote <code>form_for</code>. For several reasons it is a way better idea to use AJAX to submit the form's contents. If there are errors saving the form I want to be able to render a <code>.js.erb</code> file to the page that updates the error div with a partial that displays all the errors. </p>
  
  <p>If there are no errors I want to be able to just redirect and display a flash message.</p>
  
  <p>Is this possible?</p>