Remove valid_answers usage on Poll Question model

This commit is contained in:
Bertocq
2017-10-18 01:30:21 +02:00
parent c6d1f727af
commit 0a5ee3f861

View File

@@ -39,17 +39,12 @@ class Poll::Question < ActiveRecord::Base
author_visible_name => 'C' }
end
def valid_answers
(super.try(:split, ',')&.compact || []).map(&:strip)
end
def copy_attributes_from_proposal(proposal)
if proposal.present?
self.author = proposal.author
self.author_visible_name = proposal.author.name
self.proposal_id = proposal.id
self.title = proposal.title
self.valid_answers = I18n.t('poll_questions.default_valid_answers')
end
end