huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

Default settings returned as hash, persistent settings are strings #99

Closed Arjeno closed 8 years ago

Arjeno commented 8 years ago

When you use Setting.get_all you get a hash of settings. Default settings are returned as:

{
  foo: { bar: 'foo' }
}

Persistent settings are returned as:

{
  'foo.bar': 'foo'
}

This will return an inconsistent settings hash. I think one of these formats should be chosen, probably the string version as the hash would be too backwards incompatible.

huacnlee commented 8 years ago

You can't use nested default value, because in current rails-settings-cached has not supported that.

I suggest you change it like this:

foo_bar: 'foo'
Arjeno commented 8 years ago

Alright, thanks!