Skip to content

Commit 2125bb3

Browse files
authored
includes speakers to prevent n+1 in schedules#show (#596)
1 parent 5a829d9 commit 2125bb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/events/schedules_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def set_talks(day)
3434
talk_count = @event.schedule.talk_offsets[index]
3535
talk_offset = @event.schedule.talk_offsets.first(index).sum
3636

37-
@talks = @event.talks_in_running_order(child_talks: false).to_a.from(talk_offset).first(talk_count)
37+
@talks = @event.talks_in_running_order(child_talks: false).includes(:speakers).to_a.from(talk_offset).first(talk_count)
3838
end
3939
end

0 commit comments

Comments
 (0)