Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def network
# Links: from each step via its options
links = []

# Build a hash of step_id => step to avoid N+1 queries
steps_by_id = steps.index_by(&:id)

steps.each do |step|
step.workflow_step_options.each do |option|
target_step = steps_by_id[option.target_step_id]
Expand Down