Kuba > now i have latest typo from trunk, and it seems that a lot has changed > that makes it uneasy for me to get multiple db support. > i found file application.rb and tweaked it as in howto but there is no > mentioned lines in environment.fb, moreover, when i grepped whole typo > directory i could not even find any file that reads database.yml (which > obviously should be read by domething).
Is there a reason you want to use a different database for each Typo weblog? I've been working on supporting multiple blogs in a single Typo install by adding a new table (Accounts) and adding account_id columns to many of the existing tables (via a migration). I followed the HowTo [1] in the RoR Wiki and modified application.rb (which I assume is the same one you followed). The only issue I ran into was with ConfigManager ... the ApplicationHelper.render_file method forces the ConfigManager to be initialized (which causes it to reload settings) because it needs the theme settings when configuring the search path. I don't have a good solution for this issue yet (I'd appreciate help from anyone on the list who knows the ConfigManager well), but the workaround I did was to comment out the call to reload in ConfigManager.initialize and modified ConfigManager.reload to take an account parameter. Then in ApplicationController.reload_settings I pass the account into config.reload (this is the account variable that was set via the before_filter as per the HowTo). Hope that helps, Sean [1] http://wiki.rubyonrails.com/rails/pages/HowToUseSubdomainsAsAccountKeys _______________________________________________ Typo-list mailing list [email protected] http://rubyforge.org/mailman/listinfo/typo-list
