I’m using Ruby on Rails as my API and I would like to know how I’d go about doing multi-tenancy for my app as a SaaS. On the rails side I see there is a gem called ‘acts_as_tenant’ which seems to work really well.
What’s puzzling me the most is the sub-domain so on the rails side it knows what ‘account’ is being used and returns the appropriate data to the front end. I haven’t found anything in the documentation that handles the sub-domain in the routes and allowing it to be passed to the Rails backend. Please ask me any questions if I’m not making myself clear so I can get some advice for how I can do this.