My site allows users to change the order in which categories and what categories are displayed, and it stores that order as an array in the db. so I have:
@categories = Category.where("id IN (?)", current_user.order)
the problem is order is something like [2,4,3,6,1] and then @categories has order [1,2,3,4,6]. I want to order the @categories so it matches the order. Any help would be appreciated