3 latitude { 1 * GeoRecord::SCALE }
4 longitude { 1 * GeoRecord::SCALE }
9 timestamp { Time.now.utc }
16 trait :with_history do
17 after(:create) do |node, _evaluator|
18 (1..node.version).each do |n|
19 create(:old_node, :node_id => node.id, :version => n, :latitude => node.latitude, :longitude => node.longitude, :changeset => node.changeset)
22 # For deleted nodes, make sure the most recent old_node is also deleted.
23 if node.visible == false
24 latest = node.old_nodes.find_by(:version => node.version)
25 latest.visible = false