Simplify query to get possible answers
We added the code indicating the table in commit673ec075ebecause 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 commit7a7877656, we can simplify the code.
This commit is contained in:
@@ -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?
|
||||||
|
|||||||
Reference in New Issue
Block a user