0

不明白:

在我的控制器中:

@json = User.all.to_gmaps4rails do |user|
     "\"Title\": \"#{user.email}\""
end

在我看来:<%=@json%>

结果:

 [{"longitude": "2.13012", "latitude": "48.8014"}, {"longitude": "-90.556", "latitude": "41.0634"}, {"longitude": "2.35222", "latitude": "48.8566"}, {"longitude": "2.35222", "latitude": "48.8566"}, {"longitude": "2.27174", "latitude": "48.9065"}, {"longitude": "-5.97058", "latitude": "37.3815"}] 

为什么标题没有被处理???

4

1 回答 1

2

我猜你使用的是 0.10.0 之前的版本,它没有这个选项。

只需升级宝石。

于 2011-08-06T19:04:39.357 回答