How does Rails respond to Ajax with JSON?

In Ruby on Rails, why

= render :json => array_data

shows nothing (as seen in Firebug, the GET in the console), but

- response.content_type = "application/json"
= render :text => array_data.to_json

shows the data array?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs