Postgres ORDER BY values in IN list using Rails Active Record
问题 I receive a list of UserIds(about 1000 at a time) sorted by 'Income'. I have User records in "my system's database" but the 'Income' column is not there. I want to retrieve the Users from "my system's database" in the Sorted Order as received in the list. I tried doing the following using Active Record expecting that the records would be retrieved in the same order as in the Sorted List but it does not work. //PSEUDO CODE User.all(:conditions => {:id => [SORTED LIST]}) I found an answer to a