I have a situation which I need use a specific order for queries which the attributes are an enum, something like this:
.order(“x.status = 5, x.status = 1, x.status = 6 …”), but it isn’t the best way for readability, and I haven’t found anything about how to do it on rails way.
Is a big deal create this functionality on rails? Something like:
.order(status: [:removed, :new, :active, :corrupted …])
If yes, it’s something trivial, if a haven’t contributed with rails, can I help to build that?