app/models/tree_data.rb
# Accepts either a Project or an Organisation and generates the
# data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the
data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the data for the tree view visualisation .
def assert_valid
    allowed_nodes = [Project, Organisation]
    unless allowed_nodes.include?(@node.class) && allowed_nodes.append(nil.class).include?(@root.class)
      raise AssertionError, "Only nodes of type #{allowed_nodes.join(', ')} are supported."
    end
  end
def assert_valid allowed_nodes = [ Project , Organisation ] unless allowed_nodes . include? ( @node . class ) && allowed_nodes . append ( nil . class ) . include? ( @root . class ) raise AssertionError , "Only nodes of type #{allowed_nodes.join(', ')} are supported." end end
Accepts either a Project or an Organisation and generates the
data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the data for the tree view visualisation .