I tried the following to respond to AJAX and it works (in HAML):
- response.content_type = "application/json"
= render :text => array_data.to_json
but
- response.content_type = "application/json"
= render :json => array_data.to_json
doesn't work. I thought I could use
= render :text => array_data.to_json
instead of the first 2 lines at the top?