I am building a team management app in Rails where :users has many :organizations. I would like for users to be able to switch between organisations and manage them individually without having the /organizations/:id/ in the URL. Due to Wildcard SSL certificate costs, I would also like to avoid using subdomains to identify the organization.
As I understand it, this leaves two options:
- Store the current organization in the DB.
- Store the current organization in the session.
What would be the best option here?
Thanks
idin the URL, you can use something like FriendlyId to create slugs for eachorganization, which can be as random as you'd like.