Sha256: 44a34323b9f6509aafcc6c1a167502d8c5c1d15c4d197526e8e612581c03ecbf
Contents?: true
Size: 401 Bytes
Versions: 7
Compression:
Stored size: 401 Bytes
Contents
module ActiveRecordSurvey class Node::Answer < Node # Answer nodes are valid if their questions are valid! # Validate this node against an instance def validate_node(instance) # Ensure each parent node to this node (the goal here is to hit a question node) is valid !self.node_maps.collect { |node_map| node_map.parent.node.validate_node(instance) }.include?(false) end end end
Version data entries
7 entries across 7 versions & 1 rubygems