Rails js.erb not working
问题 I'm submitting a form, with somewhat complex nesting to a Rails controller. The Javascript is tied to the submit button as below: $('#new_search').submit(function() { var valuesToSubmit = $(this).serializeArray(); $.ajax({ type: "POST", url: $(this).attr('action'), //sumbits it to the given url of the form data: valuesToSubmit, dataType: "POST" }) return false; // prevents normal behaviour }); The Rails controller handles this fine and the parameters are all where they should be. I'm then