Convert an ActiveRecord database of values with ids into enumerable type