Class: PolicyManager::ExporterJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/policy_manager/exporter_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(user_id) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'app/jobs/policy_manager/exporter_job.rb', line 5

def perform(user_id)
  user_model = if Config.user_resource.is_a?(String)
    Config.user_resource.constantize
  else
    Config.user_resource
  end
  user = user_model.find(user_id)
  Config.exporter.perform(user)
end