If I have an array such as: ['Apple','Orange','Pear']
How could I retrieve records from a model by implementing a "custom sort"? For example, what if I want to sort the fruit_type
column by Orange
, Pear
, and then Apple
?
Not trying to sort alphabetically or numerically, but just based on a custom order that I'm looking for.