{"action":"created","issue":{"url":"https://api.github.com/repos/ckdake/setler/issues/37","labels_url":"https://api.github.com/repos/ckdake/setler/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ckdake/setler/issues/37/comments","events_url":"https://api.github.com/repos/ckdake/setler/issues/37/events","html_url":"https://github.com/ckdake/setler/issues/37","id":114662938,"number":37,"title":"Defaults not set on load","user":{"login":"cthorner","id":1474151,"avatar_url":"https://avatars.githubusercontent.com/u/1474151?v=3","gravatar_id":"","url":"https://api.github.com/users/cthorner","html_url":"https://github.com/cthorner","followers_url":"https://api.github.com/users/cthorner/followers","following_url":"https://api.github.com/users/cthorner/following{/other_user}","gists_url":"https://api.github.com/users/cthorner/gists{/gist_id}","starred_url":"https://api.github.com/users/cthorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cthorner/subscriptions","organizations_url":"https://api.github.com/users/cthorner/orgs","repos_url":"https://api.github.com/users/cthorner/repos","events_url":"https://api.github.com/users/cthorner/events{/privacy}","received_events_url":"https://api.github.com/users/cthorner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-02T19:06:29Z","updated_at":"2015-11-03T02:47:40Z","closed_at":null,"body":"Not sure if this is \"working as designed\". My scenario is:\r\n\r\nI've created some unscoped settings:\r\n\r\nFeatureflags.all_settings is set to { \"test\": true }\r\n\r\nhowever\r\n\r\nFeatureflags.defaults is still returns {}\r\n\r\nso my scoped settings(e.g., myobject.featureflags.all_settings) become {} as well.\r\n\r\nAn easy fix is:\r\n\r\nFeatureflags.defaults = Featureflags.all_settings\r\n\r\nNot exactly sure when to call this(can't put it in an initializer since it depends the database already existing). \r\n\r\nNow, myobject.featureflags.all_settings returns { \"test\": true }\r\n\r\nI can see how the existing functionality would allow more flexible scenarios, but it is confusing enough that it might warrant a short explanation in the readme. Thoughts?"},"comment":{"url":"https://api.github.com/repos/ckdake/setler/issues/comments/153224031","html_url":"https://github.com/ckdake/setler/issues/37#issuecomment-153224031","issue_url":"https://api.github.com/repos/ckdake/setler/issues/37","id":153224031,"user":{"login":"cthorner","id":1474151,"avatar_url":"https://avatars.githubusercontent.com/u/1474151?v=3","gravatar_id":"","url":"https://api.github.com/users/cthorner","html_url":"https://github.com/cthorner","followers_url":"https://api.github.com/users/cthorner/followers","following_url":"https://api.github.com/users/cthorner/following{/other_user}","gists_url":"https://api.github.com/users/cthorner/gists{/gist_id}","starred_url":"https://api.github.com/users/cthorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cthorner/subscriptions","organizations_url":"https://api.github.com/users/cthorner/orgs","repos_url":"https://api.github.com/users/cthorner/repos","events_url":"https://api.github.com/users/cthorner/events{/privacy}","received_events_url":"https://api.github.com/users/cthorner/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T02:47:40Z","updated_at":"2015-11-03T02:47:40Z","body":"I'm on setler-0.0.13. I'll take a look at settings_test.rb"}}