Module: Cell::ModelExtensions::AssociationExtensions

Defined in:
lib/cell/model_extensions.rb

Overview

Say we have a model ‘u’, that is from an old Tenant, loading an association like ‘u.books’ should swap into u.tenant while fetching.

Instance Method Summary collapse

Instance Method Details

#load_targetObject



20
21
22
23
24
# File 'lib/cell/model_extensions.rb', line 20

def load_target
  owner._activate_tenant do
    super
  end
end