Sha256: ad8ba8cbbe735c5781b1e08a260608bef938e2d04d3762993cd945b86faa317c
Contents?: true
Size: 1007 Bytes
Versions: 6
Compression:
Stored size: 1007 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses module Admin # A command with all the business logic when creating a new participatory # process group in the system. class CreateParticipatoryProcessGroup < Decidim::Commands::CreateResource fetch_file_attributes :hero_image fetch_form_attributes :organization, :title, :description, :hashtag, :group_url, :target, :promoted, :developer_group, :local_area, :meta_scope, :participatory_scope, :participatory_structure protected def run_after_hooks Decidim::ContentBlocksCreator.new(resource).create_default! end def resource_class = Decidim::ParticipatoryProcessGroup def attributes super.merge({ participatory_processes: }) end def participatory_processes Decidim::ParticipatoryProcess.where(id: form.participatory_process_ids) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems