More nil answers

This commit is contained in:
Linus Gasser 2025-10-20 11:36:22 +02:00
parent f7768bd1f8
commit 8ae9bf2e54
3 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
%h1= @question.title
- @question.answers.each do |answer|
= answer.title
(#{answer.qanswers.find_by(question: @question).registrations.where(conference: @conference).count})
(#{answer.qanswers.find_by(question: @question)&.registrations&.where(conference: @conference)&.count || 0})
.row