Here is what we are trying to do -
The idea is to allow different companies to access the same rails
application as their own personalized application. The only change in
the app per company is the title of the page, which is changed based on
the logged in user’s company through an attribute in the company table.
Internally it is one rails app, one database, security and access
control implemented based on models. The users are all “company”
specific. Currently at login, users choose the “company” from a
drop-down. Once logged in, we know who the user is, what company he
belongs to and can serve appropriate content. This works fine in testing
and I am looking for suggestions to make the login process easier.
Is there a way to eliminate the “choose company” at login? I looked
around and there seem to be a few options. But I am writing this to ask
the experts for suggestions. Certainly, there are scalability and
deployment issues that may impose an upper limit on any option – but as
a brain storming exercise, wanted to see what else is possible. We have
looked at one subdomain per company, creating company specific instances
of the app etc. but that might be an overkill for this app. We wanted to
try to stick with (as much as possible) a single database and a single
instance of the rails app.
We are playing around with the new routes in 1.2 to check if we can have
company specific urls (http://myapp.com/company1,
http://myapp.com/company2 etc.) to get around this. I will let you know
how our efforts proceed.
In the meantime, any suggestions, pointers from the experts?