module MultiTenant::ProxiesToTenant::ProxiesToTenantPluralInverseAssociation
Class methods for tenant proxies that have a plural inverse association (i.e. has_many). NOTE These are just some thoughts on maybe how to support this if we ever need it.
Public Instance Methods
current_tenant()
click to toggle source
Returns the current record of the proxy model
# File lib/multi_tenant/proxies_to_tenant.rb, line 118 def current_tenant raise MultiTenant::NotImplemented, "needs confirmed" if (tenant = proxied_tenant_class.current_tenant) tenant.send(proxied_tenant_inverse_assoc).instance_eval(&proxied_tenant_inverse_scope).first end end