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.28.4 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.9 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.3 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.8 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.2 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.7 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.1 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.6 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.10 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.9 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.0 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.5 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.0.rc5 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.28.0.rc4 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.8 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.4 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.3 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.7 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.26.5 app/models/decidim/forms/question_matrix_row.rb
decidim-forms-0.27.2 app/models/decidim/forms/question_matrix_row.rb