Method: DataGraph::Node#nest_paths

Defined in:
lib/data_graph/node.rb

#nest_pathsObject



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/data_graph/node.rb', line 83

def nest_paths
  paths = []
  
  linkages.each_pair do |name, linkage|
    if linkage.macro == :has_many
      paths << "#{name}_attributes"
    end
    
    linkage.node.nest_paths.each do |path|
      paths << "#{name}.#{path}"
    end
  end
  
  paths
end