lib/active_record/acts/category.rb
# Returns array of IDs of ancestors
Returns array of IDs of ancestors
Returns array of IDs of ancestors
def ancestors_ids
          node, nodes = self, []
          while node.parent
            node = node.parent
            nodes << node.id
          end
          nodes
        end
def ancestors_ids node , nodes = self , [ ] while node . parent node = node . parent nodes << node . id end nodes end
Returns array of IDs of ancestors
Returns array of IDs of ancestors