ErwinM / acts_as_tenant

Easy multi-tenancy for Rails in a shared database setup.
MIT License
1.53k stars 262 forks source link

Find Subdomain or Domain, prefer Domain First? #301

Closed Merovex closed 1 year ago

Merovex commented 1 year ago

Hey, I'm finally adding AAT to my app. But, I've run into a problem. I have a domain (example.org) as one account URL. But, it will not find it unless I also use the subdomain. So, I use "www.example.org" for it to work. When the subdomain is null (either in the account record or the URL), it finds no account. Perhaps the problem is the first production account tested relies on the same URL as the main site?

TIA

Merovex commented 1 year ago

Self-closing. Turns out AAT fixates on subdomain. Had to code my own way around it to shift focus to domain.