title: ruby on rails - sorting model collection with complex logic
body: <p>I have a collection of a model. I want to perform some complex sorting logic on this collection. The logic is not as simple as sorting based on a simple attribute. What the best way (performance and maintainability wise) to perform complex sorting logic on a collection of models. I am thinking along the lines of passing in a block to the sort method? But I am not sure...</p>
  
  <p>Thanks.</p>