Class: Decidim::Votings::AnswerResultForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
decidim-elections/app/forms/decidim/votings/answer_result_form.rb

Instance Method Summary collapse

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#map_model(model) ⇒ Object


16
17
18
19
20
21
# File 'decidim-elections/app/forms/decidim/votings/answer_result_form.rb', line 16

def map_model(model)
  answer = model[:answer]
  self.id = answer.id
  self.title = answer.title
  self.question_id = answer.question.id
end