【发布时间】:2011-08-02 12:39:55
【问题描述】:
什么是最好的转换方式
[[["Club three Team one", 7800], ["Club three Team two", 7801]], [], [["Club four Team one", 7807], ["Club four Team two", 7808]], []]
进入
[["Club three Team one", 7800], ["Club three Team two", 7801], ["Club four Team one", 7807], ["Club four Team two", 7808]]
在红宝石中? flatten 将其一直转换为
["Club three Team one", 7303, "Club three Team two", 7304, "Club four Team one", 7310, "Club four Team two", 7311]
【问题讨论】:
标签: ruby-on-rails ruby