Right so we're back to a single file containing the database logon
details, only this time we've scattered some of the config in four
other files as well rather than keeping it all nicely together.

Struggling to see how that helps anybody.

Your change moves the database details from one file for all
environments to separate specifications in the environment files as
well as changing the format. So there are two separate debates here.

- moving away from the yml format. We could simply go for
'database.rb' containing a details hash per environment. Essentially
replicating the existing structure in Ruby format.
- moving away from the single file to the multiple environment file
approach. But then you want to put an exception in forcing people to
source credentials from some other file. I don't see the benefit in
that. Just do it in one place.

I can see the advantage of getting rid of YML for the database
connection specification, but I think your "don't version control the
credentials" opinionation sort of torpedoes the 'put the database
details directly in the environment files' idea.

To go the whole hog surely we need a 'development_database.rb',
'test_database.rb' and 'production_database.rb' set of files in config/
environments where the differences between the environments can be
expressed *and* excluded from version control. This way you still get
the advantage of factoring the common stuff into the main
'environment.rb' file - something that is less than can be done in
YAML but only if you know the incantation.

Rails will than look for a <environment>.rb and
<environment>_database.rb file when it loads the environment.

On Jun 11, 2:39 pm, Adam Keys <[EMAIL PROTECTED]> wrote:
> ## Securing your database credentials
>
> We all know its a good idea to keep your database credentials  
> (username/password) out of source control. This patch supports that  
> raising an exception if you try to set your username or password in a  
> production setting. Instead, you specify a credentials file like so:

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to