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 values are not populated when calling .to_hash #56

Open
tyler-ball opened this issue Mar 14, 2018 · 0 comments
Open

Default values are not populated when calling .to_hash #56

tyler-ball opened this issue Mar 14, 2018 · 0 comments

Comments

@tyler-ball
Copy link
Contributor

Ran across this today. I have a config class with a default config like

    config_context :reporting do
      default(:dev, false)
    end

When I call ConfigClass.hash_dup on this class without trying to load any config into it I get back an empty hash. But if I call ConfigClass.reporting.dev and see it return the default value of false, then call .hash_dup on it the hash correctly has it populated.

I would expect the first time I call .hash_dup or .to_hash that default values would be populated.

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

1 participant