On Wed, Jun 11, 2008 at 5:58 PM, Matt Palmer <[EMAIL PROTECTED]> wrote: > If anything, this patch is anti-DRY because it locks up the database config > in a place that can only be read by Rails. If you've got anything other > than Rails that wants to talk to the database (cron jobs, other apps, > whatever) YAML is a far better way to store your credentials than a chunk of > Rails code (it's not even plain Ruby, because you need umpteen lines of > scaffolding to evaluate it and get the values out of it). Practically > anything can parse YAML, nothing except Rails can parse Rails.
-1 I agree. We have utilities which parse database.yml for rake tasks and other batch jobs. An example (which we use on a daily basis) is a utility to automatically pull and import a production database to the local dev database, for easy testing against production data. database.yml is metadata about an external resource. It makes sense to put that metadata in a DRY, easily-parsable format which can be used by things other than the Rails app itself. As the previous poster mentioned, I can imagine this approach making life harder for many rails hosting providers as well. I don't think this is a good approach to encourage or propogate. -- Chad --~--~---------~--~----~------------~-------~--~----~ 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 [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-core?hl=en -~----------~----~----~----~------~----~------~--~---
