I have an array with 2 different types of objects. They all have similar properties, like ratings / title etc...
An example is:
array = array.sort_by { |o| [o.type1.rating] }
Sometimes the array has 2 object types type1 and type2 is there any way to sort both of them using the sort_by method?