Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sort an array of hashes
array_of_hashes = ModelOneAddress.all + ModelTwoAddress.all
array_of_hashes.sort_by { |hsh| hsh[:zip] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment