In my view when a radio button is clicked, the answer is posted to the database and there is no need to render anything, but I am getting a 406 message.
application.js:
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
return false;
});
controller:
def update_result
...
render :nothing => true
end
view:
<%= form_tag update_result_answers_path, 'data-ajax' => false do %>
...
<% end %>
Thanks
406means that the server understood and processed the request, but the response from server is in a form that the client cannot understand.You should try:
render :nothinghas similar meaning tohead :ok. They both send200, excepthead :okallows you send more http headers back. It’s useful for ajax requests where all you want to send back to the browser is an acknowledgment that the request was completed. Oncomplete callback, you could update the UI to display it has done successfully.