Class: Decidim::Challenges::Admin::ExportChallengeSurveys

Inherits:
Decidim::Command
  • Object
show all
Defined in:
app/commands/decidim/challenges/admin/export_challenge_surveys.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(challenge, format, current_user) ⇒ ExportChallengeSurveys

challenge - 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
17
# File 'app/commands/decidim/challenges/admin/export_challenge_surveys.rb', line 12

def initialize(challenge, format, current_user)
  super()
  @challenge = challenge
  @format = format
  @current_user = current_user
end

Instance Method Details

#callObject

Exports the challenge registrations.

Broadcasts :ok if successful, :invalid otherwise.



22
23
24
# File 'app/commands/decidim/challenges/admin/export_challenge_surveys.rb', line 22

def call
  broadcast(:ok, export_data)
end