Forum: Ruby on Rails Dynamic database configuration ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A05834e9b5954947eb0ba3b570c47d5e?d=identicon&s=25 Pratik Naik (pratik)
on 2006-05-23 12:13
(Received via mailing list)
Hi,

I'm trying to run typo in multi user mode outside the box ( without
making too many modifications in core typo code ). I want to determine
database settings dynamically using subdomains. Could someone guide me
to the right direction ?

Thanks,
Pratik
A05834e9b5954947eb0ba3b570c47d5e?d=identicon&s=25 Pratik Naik (pratik)
on 2006-05-23 22:27
(Received via mailing list)
Anyone :-s ?
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2006-05-23 22:42
(Received via mailing list)
> On 5/23/06, Pratik <pratiknaik@gmail.com> wrote:
>> Hi,
>>
>> I'm trying to run typo in multi user mode outside the box ( without
>> making too many modifications in core typo code ). I want to determine
>> database settings dynamically using subdomains. Could someone guide me
>> to the right direction ?

I'm pretty sure that database.yml gets run through ERB before being read
by rails.  So maybe use request.env['SERVER_NAME'] and do some stuff in
there to set it to what you want...?
This topic is locked and can not be replied to.