我已经完成了此操作,但不记得它现在如何完成。rails添加到json响应
有来自四方的一个JSON响应,其中包括:
"hereNow"=>{"count"=>1, "groups"=>[{"type"=>"friends", "name"=>"friends here", "count"=>0, "items"=>[]}, ...]}
我@place回应(这是位置信息),但想的名字和图像传递给我的JSON视图。
思想是是像@place['hereNow'] << response['venue']['hereNow']
将之列入我render :json => @place
分配给它之前是什么@place [ '此时此地']?你想要什么? –