Module: Apartment::ActiveJob
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/apartment/active_job.rb,
lib/apartment/active_job/version.rb
Constant Summary collapse
- VERSION =
"1.0.1"
Instance Method Summary collapse
Instance Method Details
#enqueue(*_args, **_kargs) ⇒ Object
18 19 20 21 22 |
# File 'lib/apartment/active_job.rb', line 18 def enqueue(*_args, **_kargs) Apartment::Tenant.switch('public') do super end end |
#initialize(*_args, **_kargs) ⇒ Object
13 14 15 16 |
# File 'lib/apartment/active_job.rb', line 13 def initialize(*_args, **_kargs) @tenant = Apartment::Tenant.current super end |
#serialize ⇒ Object
24 25 26 |
# File 'lib/apartment/active_job.rb', line 24 def serialize super.merge('tenant' => @tenant) end |