lib/active_record_survey/node_map.rb
def has_infinite_loop?(path = [])
			self.survey.node_maps.select { |i| i.parent == self && !i.marked_for_destruction? }.each { |i|
				# Detect infinite loop
				if path.include?(self.node) || i.has_infinite_loop?(path.clone.push(self.node))
					return true
				end
			}
			path.include?(self.node)
		end
def has_infinite_loop?(path = [])
			self.survey.node_maps.select { |i| i.parent == self && !i.marked_for_destruction? }.each { |i|
				# Detect infinite loop
				if path.include?(self.node) || i.has_infinite_loop?(path.clone.push(self.node))
					return true
				end
			}
			path.include?(self.node)
		end
Check to see whether there is an infinite loop from this node_map