Skip to content

Nested attributes can't be changed dynamically #57

@joegatt

Description

@joegatt

I'm using the settingslogic gem in my Rails app (Ruby 2.0.0p247 / Rails 3.2.13).

I can dynamically change a setting when it is not nested e.g.

#config/settings.yml
defaults:&defaults
  mysetting: 1
  nested:
    myothersetting: 2

Settings[:mysetting] = 10
Settings.mysetting # puts 10

But I am unable to change a nested attribute in the same way:

Settings[:nested][:myothersetting] = 20
Settings.nested.myothersetting # puts 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions