[Rails] Re: Different database for different domains

2009-03-09 Thread Konstantin
On 9 мар, 16:33, Ar Chron 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 th

[Rails] Re: Different database for different domains

2009-03-09 Thread Ar Chron
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. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~--

[Rails] Re: Different database for different domains

2009-03-09 Thread Konstantin
The first question remains, please, give me a key to resolve the issue. Currently I see only one way: symlink all files from one domain to another except /config folder, and put custom /config to every domain. But there should be more elegant solution! --~--~-~--~~~---~

[Rails] Re: Different database for different domains

2009-03-07 Thread Konstantin
> 2. > And another question about subdomains. > Usually I use something like that: > link_to 'Link title', :sort => 'soft_field' - and this produces a link > to the current url with additonal ?sort=sort_field > parameter:http://site1.com/controller/?sort=-sort_field > But this doesn't work on sub