Simplify query to get possible answers

We added the code indicating the table in commit 673ec075e because back
then we had a `title` column in both the `poll_question_answers` table
and the `poll_question_answer_translations` table.

Since that's no longer the case since commit 7a7877656, we can simplify
the code.
This commit is contained in:
Javi Martín
2024-05-13 23:21:20 +02:00
parent 5a0fa28189
commit bfee1b0ecb

View File

@@ -72,7 +72,7 @@ class Poll::Question < ApplicationRecord
end end
def possible_answers def possible_answers
question_answers.joins(:translations).pluck("poll_question_answer_translations.title") question_answers.joins(:translations).pluck(:title)
end end
def answers_with_read_more? def answers_with_read_more?