Skip to content

Default values are not populated when calling .to_hash #56

@tyler-ball

Description

@tyler-ball

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions