Class: Decidim::Conferences::Admin::ExportConferenceRegistrations

Inherits:
Decidim::Command
  • Object
show all
Defined in:
decidim-conferences/app/commands/decidim/conferences/admin/export_conference_registrations.rb

Overview

This command is executed when the user exports the registrations of a Conference from the admin panel.

Instance Method Summary collapse

Methods inherited from Decidim::Command

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

Constructor Details

#initialize(conference, format, current_user) ⇒ ExportConferenceRegistrations

conference - The current instance of the page to be closed. format - a string representing the export format current_user - the user performing the action



12
13
14
15
16
# File 'decidim-conferences/app/commands/decidim/conferences/admin/export_conference_registrations.rb', line 12

def initialize(conference, format, current_user)
  @conference = conference
  @format = format
  @current_user = current_user
end

Dynamic Method Handling

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

Instance Method Details

#callObject

Exports the conference registrations.

Broadcasts :ok if successful, :invalid otherwise.



21
22
23
# File 'decidim-conferences/app/commands/decidim/conferences/admin/export_conference_registrations.rb', line 21

def call
  broadcast(:ok, export_data)
end