DEV Community

Discussion on: A Rails Multi-Tenant Strategy That's ~30 Lines and "Just Works"

Collapse
 
codingbyharry profile image
Harry

Two possible options to consider:

  1. Create the tenant before the user so that the resource exists
  2. Don't use the concern on the user model and add a belongs_to :account, optional: true. Then probably want validations to ensure an account always exists on update.