I have a form created using HAML, that is submitted via:
$('appt_form').request({
onComplete: function(){
...
}
})
And for testing I have the controller simply returning:
render :json => {:name => "Ted"}.to_json
But that causes the browser to launch a dialog that has the options to 'Open with...' or 'Save As...'.
I havew other methods that are called from AJAX and return json that work just fine using
req = new Ajax.Request('/mycontroller/')
But I can't figure out what's different in the first case. Thoughts?