I'm working in my development environment. The behavior I want: I have a form on a modal dialog. The user clicks submit and data is sent to my "questions" controller. Some emails are sent and then the contents of the dialog are refreshed to say "Message sent successfully." Pretty basic. The problem is that I can't set the headers properly so rails is processing the data as html, not javascript. The emails go out but rails returns a 406 error. Here is my code:I'm working in my development environment. The