My rails application currently works as follows:
In the database, there are tenants, also known as 'companies'. Everything in the database belongs to one of these companies, and so have a company_id attribute in order to separate them.
My application determines which company to use based on the subdomain in the link inputted by the user, so for example:
apple.myapplicationsnamehere.com
Should look at the companies in my database, and find out which one is called "apple", then separate all of the data by apples ID.
This works fine on the localhost (if you're wondering how this is possible, I used a redirect to my localhost that I found online - http://apple.lvh.me:3000/)
However, this does not work on Cloud Foundry.
I have tried to use vmc's map function to create the Url: apple.myapplicationsnamehere.cloudfoundry.com, but this does not work, and simply appending a subdomain to my application doesn't work either.
Does anyone know of any way around this? Or perhaps I'm missing something? The database was seeded with caldecott already, so the companies certainly exist in the database.