diff --git a/lib/apartment/railtie.rb b/lib/apartment/railtie.rb index ba3a9dc5..ddc3e18e 100644 --- a/lib/apartment/railtie.rb +++ b/lib/apartment/railtie.rb @@ -39,6 +39,11 @@ def connection Apartment::Tenant.init_once end end + + def arel_table + Apartment::Tenant.init_once + super + end end ActiveRecord::Base.singleton_class.prepend ApartmentInitializer