Sha256: 3fa69822ae1b4a597929e2176fd69f5693c12c582487cb76335c1c7c42fdcd72

Contents?: true

Size: 524 Bytes

Versions: 71

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  module Forms
    # A concern with the components needed when you want a model to be have a questionnaire attached
    module HasQuestionnaire
      extend ActiveSupport::Concern

      included do
        has_one :questionnaire,
                class_name: "Decidim::Forms::Questionnaire",
                dependent: :destroy,
                inverse_of: :questionnaire_for,
                as: :questionnaire_for
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
decidim-forms-0.29.1 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.4 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.27.9 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.29.0 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.3 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.27.8 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.29.0.rc4 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.29.0.rc3 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.29.0.rc2 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.29.0.rc1 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.2 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.27.7 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.1 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.27.6 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.26.10 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.26.9 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.0 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.27.5 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.0.rc5 app/models/concerns/decidim/forms/has_questionnaire.rb
decidim-forms-0.28.0.rc4 app/models/concerns/decidim/forms/has_questionnaire.rb