in rails, if you render :json => blah, to_json is automatically called on blah.  no need to do it explicitly.