Sha256: c84a7b054bc3f551d415f8db69731c6ba6e1a3f9dbe041c2c493d08368bce321

Contents?: true

Size: 402 Bytes

Versions: 6

Compression:

Stored size: 402 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ReportingProposals
    module Admin
      module CategoryFormOverride
        extend ActiveSupport::Concern

        included do
          attribute :valuator_ids, Array[Integer]

          def map_model(model)
            self.valuator_ids = model.category_valuators.pluck(:valuator_role_id)
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-reporting_proposals-0.6.0 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb
decidim-reporting_proposals-0.5.2 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb
decidim-reporting_proposals-0.5.1 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb
decidim-reporting_proposals-0.5.0 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb
decidim-reporting_proposals-0.4.2 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb
decidim-reporting_proposals-0.2.0 app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb