Sha256: 7adba11714cd65d1a5522108d395d49127aa333defb72630a34ee947b752b03b
Contents?: true
Size: 795 Bytes
Versions: 8
Compression:
Stored size: 795 Bytes
Contents
# frozen_string_literal: true module Decidim module System # A command with all the business logic to create the default content blocks # for a newly-created organization. class CreateDefaultContentBlocks < Decidim::Command DEFAULT_CONTENT_BLOCKS = [:hero, :sub_hero, :highlighted_content_banner, :how_to_participate, :stats, :metrics, :footer_sub_hero].freeze # Public: Initializes the command. # # form - A form object with the params. def initialize(organization) @organization = organization end # Executes the command. # # Returns nothing. def call Decidim::ContentBlocksCreator.new(organization).create_default! end private attr_reader :organization end end end
Version data entries
8 entries across 8 versions & 1 rubygems