Class: Decidim::Challenges::Admin::ExportChallengeSurveys
- Inherits:
-
Decidim::Command
- Object
- Decidim::Command
- Decidim::Challenges::Admin::ExportChallengeSurveys
- 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
-
#call ⇒ Object
Exports the challenge registrations.
-
#initialize(challenge, format, current_user) ⇒ ExportChallengeSurveys
constructor
challenge - The current instance of the page to be closed.
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
#call ⇒ Object
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 |