Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,35 @@
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',
header: 'Node header 2',
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
Expand Down