On Wed, Jun 11, 2008 at 2:39 PM, Adam Keys <[EMAIL PROTECTED]> wrote:
> ## What's it look like?
>
> In config/environment.rb:
>
>> config.active_record.connection.configure do |db|
>> db.adapter = 'mysql'
>> db.encoding = 'utf8'
>> end
>
> In config/development.rb:
>
>> config.active_record.connection.configure do |db|
>> db.database = 'test_app_development'
>> db.socket = '/tmp/mysql.sock'
>> db.username = 'root'
>> db.password = ''
>> end
>
I don't really mind dropping the YAML configuration, but is there any
reason you aren't just using a regular Hash? i.e.
## environment.rb
config.active_record.connection = {
:adapter => 'mysql',
....
}
## environments/development.rb
config.active_record.connection.merge {
:database => 'my_app_dev',
:username => 'dev',
:password => 'password'
}
(note the merge in specific environments)
I guess this boils down to - why generate the Hash, when just writing
the Hash is pretty much equally readable? Do we get some benefit using
the block/DSL-style syntax? If not, the implementation could perhaps
be simpler.
--
* J *
~
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---