Is it possible to construct a scope like this
User.where(:id => [5,4,3,2,7,1000] )
in a way, that
a) the results are in the order of the ids passed. (This is the simple part, since you can just load the records, and sort the result accordingly)
b) the result is not an array but a scope in itself (The tricky part ;)
Update: Solutions that only work on MySQL are welcome.