Show answers with attachments in additional info
We weren't showing the details of answers without a description, even if they had images, videos or documents. Some users found that behavior unexpected since the description isn't a mandatory field and so they left it blank, but they added images to that answer and they didn't appear on the poll page. Note we had a condition not to show the title of an answer when it had no description. I think that condition was redundant because answers without a description weren't loaded in the first place. Anyway, that condition doesn't make sense anymore because we're displaying answers with images but no description.
This commit is contained in:
@@ -22,7 +22,7 @@ class PollsController < ApplicationController
|
||||
@questions = @poll.questions.for_render.sort_for_list
|
||||
@token = poll_voter_token(@poll, current_user)
|
||||
@poll_questions_answers = Poll::Question::Answer.where(question: @poll.questions)
|
||||
.where.not(description: "").order(:given_order)
|
||||
.with_content.order(:given_order)
|
||||
|
||||
@answers_by_question_id = {}
|
||||
poll_answers = ::Poll::Answer.by_question(@poll.question_ids).by_author(current_user&.id)
|
||||
|
||||
Reference in New Issue
Block a user