A Rails developer is building a multi-tenant SaaS app. Which competency is critical to prevent data leakage between tenants?
-
A
Using separate databases per tenant always
-
B
Scoping every query to the current tenant using a default scope or explicit where clause, with test coverage verifying isolation
-
C
Relying on UI-level filtering to hide other tenants' data
-
D
Using `find` instead of `find_by` for all lookups