Just a question, i have an array with some ids array = [19, 5, 1, 4]
when i call a where on it Delivery.where(id: array.map(&:id))
to have an active record relation instead an array, the “where” statement is sorting the ids and give me all objects sorting by ids :
#<ActiveRecord::Relation [#<Delivery id: 1, ... >, #<Delivery id: 4, ... >, #<Delivery id: 5, ... >, #<Delivery id: 19, ... >
Is anyone know how to keep the original order ?
Thanks !