Class: Decidim::ExtraUserFields::Admin::ExportUsers

Inherits:
Rectify::Command
  • Object
show all
Defined in:
app/commands/decidim/extra_user_fields/admin/export_users.rb

Overview

Command to export organization users from the participants admin panel.

Instance Method Summary collapse

Constructor Details

#initialize(format, current_user) ⇒ ExportUsers

format - a string representing the export format current_user - the user performing the action



10
11
12
13
# File 'app/commands/decidim/extra_user_fields/admin/export_users.rb', line 10

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

Instance Method Details

#callObject

Exports the current organization not deleted users.

Broadcasts :ok if successful, :invalid otherwise.



18
19
20
# File 'app/commands/decidim/extra_user_fields/admin/export_users.rb', line 18

def call
  broadcast(:ok, export_data)
end