Class: Decidim::Admin::CreateNewsletter

Inherits:
Commands::CreateResource show all
Defined in:
decidim-admin/app/commands/decidim/admin/create_newsletter.rb

Overview

Creates a newsletter and assigns the right author and organization.

Instance Method Summary collapse

Methods inherited from Commands::CreateResource

#call

Methods inherited from Command

call, #evaluate, #method_missing, #respond_to_missing?, #transaction, #with_events

Constructor Details

#initialize(form, content_block) ⇒ CreateNewsletter

Initializes the command.

form - The source fo data for this newsletter. content_block - An instance of ‘Decidim::ContentBlock` that holds the

newsletter attributes.


14
15
16
17
# File 'decidim-admin/app/commands/decidim/admin/create_newsletter.rb', line 14

def initialize(form, content_block)
  super(form)
  @content_block = content_block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Decidim::Command