Module: DelayedJobAdapterMonkeyPatch

Defined in:
lib/acts_as_tenant/delayed_job/active_job_adapter.rb

Instance Method Summary collapse

Instance Method Details

#performObject



2
3
4
5
6
7
8
9
10
# File 'lib/acts_as_tenant/delayed_job/active_job_adapter.rb', line 2

def perform
  if 
    ActsAsTenant.with_tenant() do
      super
    end
  else
    super
  end
end

#tenant_accountObject



12
13
14
15
16
17
18
19
# File 'lib/acts_as_tenant/delayed_job/active_job_adapter.rb', line 12

def 
  @tenant_account ||= begin
     = job_data.delete("acts_as_tenant")
    return unless 

    ["tenant_class"].constantize.find(["tenant_id"])
  end
end