Hi,
I think it would be useful, if the find methods sorts the search result, if the model searched for responds to the <=> method and no :order option has been passed.
So if I i.e. had:
class Item < ActiveRecordBase
def <=>(other)
value <=> other.value
end
end
Then
Item.find(:all)
would be sorted the way specified. If the <=> is not specfied, sorting should not take place. If the :order option is specified, it should not take place as well.
This is usefull, because sometimes there are no means on specifying the order by sql. I.e. in cardiology you have the following coronar segments: rca1, rca2, rca3, rca4, lca5, lad6, lad7, lad8, lad9, lad10, circ11, circ12, circ13, circ14, circ15. This order is not a lexical order but one given by blood flow. With the <=> method you could handle this i.e. by using the indexes of a constant array.
Johannes