Class: Custodian::Core::Node

Inherits:
ApplicationRecord show all
Defined in:
app/models/custodian/core/node.rb

Constant Summary collapse

DEMAND_TYPES =
%w[binary fixed variable_manual variable_by_tag].freeze

Instance Method Summary collapse

Instance Method Details

#graphObject

Node deliberately has no graph_id column: graph membership is resolved via the ancestry root instead, to avoid an unused foreign key.



22
23
24
# File 'app/models/custodian/core/node.rb', line 22

def graph
  Graph.find_by(root_node: root)
end