Method: ChronicTree::Command::AddChildElement#do

Defined in:
lib/chronic_tree/command.rb

#doObject



42
43
44
45
46
47
48
49
50
# File 'lib/chronic_tree/command.rb', line 42

def do
  source.send("elements_under_#{source.current_scope_name}_parent").create(
    root_id: source_root_id,
    child_id: child_id,
    distance: distance,
    start_time: source.current_time_at,
    end_time: 1000.years.since(source.current_time_at)
  )
end