def categories_list=(ids)
      ids = ids.is_a?(String) ? ids.split(',') : ids
      self.categories = ids.map do |id|
        Category.where(id: id).first
      end
    end
def categories_list=(ids)
      ids = ids.is_a?(String) ? ids.split(',') : ids
      self.categories = ids.map do |id|
        Category.where(id: id).first
      end
    end
Public: Accepts an array of category ids as parameter and adds all
 of them to the model