Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Arjeno opened this issue May 6, 2016 · 2 comments
Closed

Comments

@Arjeno
Copy link

Arjeno commented May 6, 2016

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
Copy link
Owner

huacnlee commented May 6, 2016

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
Copy link
Author

Arjeno commented May 10, 2016

Alright, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants