I have an array that looks something like this:
[[100, "one"],
[101, "one"],
[102, "one"],
[103, "two"],
[104, "three"],
[105, "three"]]
What I would like to do is create an array of hashes that looks like this
[{"one" => [100,101,102]},
{"two" => [103]},
{"three" => [104,105]}]
The number portion will always be unique, the string portion will have duplicates. Every way I think about doing this I get some long function, I would like to know the "rails way" of going about this, I'm sure there's some obscure function I am missing.