{"action":"opened","issue":{"url":"https://api.github.com/repos/anthonator/soulless/issues/5","repository_url":"https://api.github.com/repos/anthonator/soulless","labels_url":"https://api.github.com/repos/anthonator/soulless/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/anthonator/soulless/issues/5/comments","events_url":"https://api.github.com/repos/anthonator/soulless/issues/5/events","html_url":"https://github.com/anthonator/soulless/issues/5","id":273926913,"number":5,"title":"Does not serialize Soulless::Models (as an array) within other Soulless::Models","user":{"login":"jacobsmith","id":3843162,"avatar_url":"https://avatars0.githubusercontent.com/u/3843162?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobsmith","html_url":"https://github.com/jacobsmith","followers_url":"https://api.github.com/users/jacobsmith/followers","following_url":"https://api.github.com/users/jacobsmith/following{/other_user}","gists_url":"https://api.github.com/users/jacobsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsmith/subscriptions","organizations_url":"https://api.github.com/users/jacobsmith/orgs","repos_url":"https://api.github.com/users/jacobsmith/repos","events_url":"https://api.github.com/users/jacobsmith/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsmith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-14T20:11:45Z","updated_at":"2017-11-14T20:11:45Z","closed_at":null,"author_association":"NONE","body":"It appears that `soulless` does not \"deep-serialize\" as one might expect. For example, given:\r\n\r\n```\r\nclass Foo < Soulless::Model\r\n  attribute :bar, Bar\r\nend\r\n\r\nclass Bar < Soulless::Model\r\n  attribute :id, String\r\nend\r\n```\r\n\r\nOne *can* write:\r\n\r\n```\r\nFoo.bar = Bar.new(id: \"bar id one\")\r\n```\r\n\r\nHowever, one *cannot* write:\r\n\r\n```\r\nFoo.bar = [Bar.new(id: \"one\"), Bar.new(id: \"two\")]\r\n```\r\n\r\nit expects the array to respond to `to_hash`\r\n\r\na failing spec is available here: https://github.com/jacobsmith/soulless/pull/1\r\n"}}
{"actor":{"display_login":"jacobsmith"}}