lib/active_record_survey/node_map.rb
def ancestors_until_node_not_ancestor_of(klass)
			if !self.parent || !self.node.class.ancestors.include?(klass)
				return []
			end

			[self] + self.parent.ancestors_until_node_not_ancestor_of(klass)
		end
def ancestors_until_node_not_ancestor_of(klass)
			if !self.parent || !self.node.class.ancestors.include?(klass)
				return []
			end

			[self] + self.parent.ancestors_until_node_not_ancestor_of(klass)
		end
Gets all the ancestor nodes until one is not an ancestor of klass