diff --git a/db/seeds.rb b/db/seeds.rb index ead4dcc..bca47fa 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -19,7 +19,8 @@ button_text: 'Button text 1', next_question: 'Next question 1', is_root: true, - flowchart_id: flowchart.id + flowchart_id: flowchart.id, + flowchart_node_id: nil ) node2 = FlowchartNode.create!( text: 'Node text 2', @@ -27,7 +28,26 @@ button_text: 'Button text 2', next_question: 'Next question 2', is_root: false, - flowchart_id: flowchart.id + flowchart_id: flowchart.id, + flowchart_node_id: 1 + ) + node3 = FlowchartNode.create!( + text: 'Node text 3', + header: 'Node header 3', + button_text: 'Button text 3', + next_question: 'Next question 3', + is_root: false, + flowchart_id: flowchart.id, + flowchart_node_id: 2 + ) + node4 = FlowchartNode.create!( + text: 'Node text 4', + header: 'Node header 4', + button_text: 'Button text 4', + next_question: 'Next question 4', + is_root: false, + flowchart_id: flowchart.id, + flowchart_node_id: 2 ) # set foreign keys