def get_all_category_children
      direct_children = self.category_children
      all_children = []

      direct_children.each do |direct_child|
        all_children.push(direct_child)
        all_children = all_children + direct_child.get_all_category_children
      end

      all_children
    end
def get_all_category_children
      direct_children = self.category_children
      all_children = []

      direct_children.each do |direct_child|
        all_children.push(direct_child)
        all_children = all_children + direct_child.get_all_category_children
      end

      all_children
    end
This function return all category children of the current category.