Fix Question#show view when user is nil

This commit is contained in:
Georg Gadinger 2020-05-09 02:43:43 +02:00
parent 3ae83d8d02
commit ae8e0b651a
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
Load more
- if user_signed_in? and !current_user.answered? @question and current_user != @question.user and @question.user.privacy_allow_stranger_answers
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
.card#q-answer-box
.card-header
%h3.card-title= t('views.question.title')