binarylogic / settingslogic

A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern.
http://rdoc.info/projects/binarylogic/settingslogic
MIT License
1.4k stars 186 forks source link

Partial setting override #46

Open sweatpantsninja opened 11 years ago

sweatpantsninja commented 11 years ago

I have the following nested settings: https://gist.github.com/sweatpantsninja/4741147

Settings.cloudant.facebook_database should always be "facebook_data", but in development, I get Settingslogic::MissingSetting: Missing setting 'facebook_database' in 'cloudant' section

It seems as if it overrides the nested hash entirely, rather than merging it.

pavolzbell commented 11 years ago

Yes the hash is overridden instead of being merged and I found that to be a big problem too. @binarylogic please look closely at this issue and implement some kind of deep hash merging. BTW we are not the first who experienced this, look at #21 #16 (actually provides partial solution to this problem)