On 9 мар, 16:33, Ar Chron <[email protected]> wrote: > Haven't done it myself, but have you looked at > ActiveRecord::Base.establish_connection? > > If you can establish model-specific connections, you should be able to > establish a specific connection for a specific subdomain.
Okay, thanks! The main problem is that I don't know where to put a code for re- defining database connection. Should it be somewhere in initializers? Will I have an access to host name there? Also, I have some parameters in config/enviroments/production.rb and they should be changed for another domain too --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

