On Jun 12, 2008, at 5:47 AM, Rick Olson wrote: >> That's also a lot harder to read and write, especially for >> newbies. I > definitely support an all-ruby approach. Supporting some generic hash > merging, as Scott suggested, might not be a bad idea though. >
Something like this is ugly, but does the job: config.active_record.connection.configure do |db| YAML.load(ERB.new(File.read('config/database.yml').result)) [Rails.env].each_pair do |key, value| db.send("#{key}=", value) end end -- ~akk http://therealadam.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---