I am sending data from a grid back to /configuration/edit/id
This works, the data gets to the server.
The problems is that my jQuery setup:
$.ajaxSetup({ url: '<%= params[:id] %>.json', contentType: "application/json", dataType: "application/json", success: function(msg) { console( "Data Saved: " + msg ); } });
and controller
respond_to do |format| begin format.json { # some logic here } format.html { render :action => 'edit.html.erb' } rescue end
gives me an ActionView error.
So, data goes to server from jQuery, but then the server side error. No idea why it's reverting to edit.erb
Any help appreciated.