Sha256: 06ec58748991b39182dd2bcd756c4c4e6d91953f611ad3a44dc7b0c258d9e029
Contents?: true
Size: 682 Bytes
Versions: 44
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings class AnswerOption < Meetings::ApplicationRecord include Decidim::TranslatableResource default_scope { order(arel_table[:id].asc) } translatable_fields :body belongs_to :question, class_name: "Decidim::Meetings::Question", foreign_key: "decidim_question_id" has_many :choices, class_name: "AnswerChoice", foreign_key: "decidim_answer_option_id", dependent: :destroy, inverse_of: :answer_option def translated_body Decidim::Forms::AnswerOptionPresenter.new(self).translated_body end end end end
Version data entries
44 entries across 44 versions & 1 rubygems