[Solved] Multisort using Ruby [closed]

[ad_1]

What you have works. Just don’t forget to assign the sorted collection to a variable (sort_by and reverse do not change the collection).

Bonus: here’s arguably a nicer version (one pass, instead of two)

a.sort_by{ |v| -v[:a_value] }

[ad_2]

solved Multisort using Ruby [closed]