For row-level partitioning, gems such as acts_as_tenant and activerecord-multi-tenant already implement the default-scoping behaviour and are subject to community peer review. Reimplementing from scratch is unnecessary.
type
recommendation
takeawayDon't reinvent multi-tenancy — use existing gems