Class: Decidim::System::CreateDefaultContentBlocks
- Inherits:
-
Command
- Object
- Command
- Decidim::System::CreateDefaultContentBlocks
- Defined in:
- app/commands/decidim/system/create_default_content_blocks.rb
Overview
A command with all the business logic to create the default content blocks for a newly-created organization.
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(organization) ⇒ CreateDefaultContentBlocks
constructor
Public: Initializes the command.
Constructor Details
#initialize(organization) ⇒ CreateDefaultContentBlocks
Public: Initializes the command.
form - A form object with the params.
11 12 13 |
# File 'app/commands/decidim/system/create_default_content_blocks.rb', line 11 def initialize(organization) @organization = organization end |
Instance Method Details
#call ⇒ Object
Executes the command.
Returns nothing.
18 19 20 |
# File 'app/commands/decidim/system/create_default_content_blocks.rb', line 18 def call Decidim::ContentBlocksCreator.new(organization).create_default! end |