Sha256: 1f642cbfb6ba7fa50b3dd82449e096d0097fe731e1a595ebaa35a1639e3266d3

Contents?: true

Size: 643 Bytes

Versions: 6

Compression:

Stored size: 643 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
      # 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

6 entries across 6 versions & 1 rubygems

Version Path
decidim-system-0.29.1 app/commands/decidim/system/create_default_content_blocks.rb
decidim-system-0.29.0 app/commands/decidim/system/create_default_content_blocks.rb
decidim-system-0.29.0.rc4 app/commands/decidim/system/create_default_content_blocks.rb
decidim-system-0.29.0.rc3 app/commands/decidim/system/create_default_content_blocks.rb
decidim-system-0.29.0.rc2 app/commands/decidim/system/create_default_content_blocks.rb
decidim-system-0.29.0.rc1 app/commands/decidim/system/create_default_content_blocks.rb