Sha256: b23ecfdda4c9bad0170ed08af2c4ad08ca3adcf6ae1d24b0b49a7aff4c70d736

Contents?: true

Size: 533 Bytes

Versions: 38

Compression:

Stored size: 533 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Forms
    # The data store for a QuestionMatrix in the Decidim::Forms component.
    class QuestionMatrixRow < Forms::ApplicationRecord
      include Decidim::TranslatableResource

      translatable_fields :body
      belongs_to :question, class_name: "Question", foreign_key: "decidim_question_id"

      delegate :answer_options, :mandatory, :max_choices, to: :question

      scope :by_position, -> { order(:position) }
      default_scope { by_position }
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
decidim-forms-0.27.1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.4 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.0 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.3 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.0.rc2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.0.rc1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.0 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.0.rc2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.0.rc1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.0 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.0.rc4 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.0.rc3 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.0.rc2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.25.0.rc1 app/models/decidim/forms/question_matrix_row.rb