My use case for this is that i have a rails app using STI. I’ve got an array of results from all of my inheriting models and i’d like to sort them ALL based on a common attribute they share — a zip code.
Here is a RIDICULOUSLY simple way to use Ruby to sort the entire array — please note though, the code is querying for “Model.all” just to make the example simple — in my REAL code i have more complicated search criteria.