On 27 Feb 2007, at 03:40, Tony K. wrote:
> I have an application where many subdomains will exist depending upon
> geographic location (location1.example.com and location2.example.com),
> but all subdomains will use the same code, only have different data.
> Is there a way to handle subdomains virtually with RoR or will it be
> necessary to copy the same code to each hard coded subdomain?
The account_location plugin (http://dev.rubyonrails.org/svn/rails/
plugins/account_location/) will help you out for your subdomain
handling, I''m using it in almost all my apps. Then you''ll need
to use
a wildcard DNS entry so that the nameserver will pass any url
belonging to the domain to your rails webserver (*.mydomain.com).
There are a few way to go at this:
1) Keep all your data in one database and filter out the data for
your each of the locations
2) Use the location to set the database connection in your
application controller so that you can use a separate database for
each customer
Best regards
Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---