{"action":"created","issue":{"url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/2","labels_url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/2/comments","events_url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/2/events","html_url":"https://github.com/rstacruz/ractive-ractive/pull/2","id":91070568,"number":2,"title":"Fix #1: Ractive-Ractive leaks child instance's properties","user":{"login":"ElliotChong","id":270706,"avatar_url":"https://avatars.githubusercontent.com/u/270706?v=3","gravatar_id":"","url":"https://api.github.com/users/ElliotChong","html_url":"https://github.com/ElliotChong","followers_url":"https://api.github.com/users/ElliotChong/followers","following_url":"https://api.github.com/users/ElliotChong/following{/other_user}","gists_url":"https://api.github.com/users/ElliotChong/gists{/gist_id}","starred_url":"https://api.github.com/users/ElliotChong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElliotChong/subscriptions","organizations_url":"https://api.github.com/users/ElliotChong/orgs","repos_url":"https://api.github.com/users/ElliotChong/repos","events_url":"https://api.github.com/users/ElliotChong/events{/privacy}","received_events_url":"https://api.github.com/users/ElliotChong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-25T20:42:28Z","updated_at":"2015-07-01T07:30:46Z","closed_at":"2015-07-01T07:15:55Z","pull_request":{"url":"https://api.github.com/repos/rstacruz/ractive-ractive/pulls/2","html_url":"https://github.com/rstacruz/ractive-ractive/pull/2","diff_url":"https://github.com/rstacruz/ractive-ractive/pull/2.diff","patch_url":"https://github.com/rstacruz/ractive-ractive/pull/2.patch"},"body":"Implemented method proxying / chaining based on keypath to fix #1.\r\n\r\nIf the keypath being accessed by the parent exists on a child Ractive instance then the method call is executed within the context of that child. This works recursively as well so nested references will still act as expected. Methods which update the data model notify the parent of updates and keep all references synchronized."},"comment":{"url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/comments/117504393","html_url":"https://github.com/rstacruz/ractive-ractive/pull/2#issuecomment-117504393","issue_url":"https://api.github.com/repos/rstacruz/ractive-ractive/issues/2","id":117504393,"user":{"login":"rstacruz","id":74385,"avatar_url":"https://avatars.githubusercontent.com/u/74385?v=3","gravatar_id":"","url":"https://api.github.com/users/rstacruz","html_url":"https://github.com/rstacruz","followers_url":"https://api.github.com/users/rstacruz/followers","following_url":"https://api.github.com/users/rstacruz/following{/other_user}","gists_url":"https://api.github.com/users/rstacruz/gists{/gist_id}","starred_url":"https://api.github.com/users/rstacruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstacruz/subscriptions","organizations_url":"https://api.github.com/users/rstacruz/orgs","repos_url":"https://api.github.com/users/rstacruz/repos","events_url":"https://api.github.com/users/rstacruz/events{/privacy}","received_events_url":"https://api.github.com/users/rstacruz/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T07:30:46Z","updated_at":"2015-07-01T07:30:46Z","body":"Sorry buddy, you've obviously put a lot of work into this (thank you!) but ultimately I'll have to hold off on merging this in on the grounds that:\r\n\r\n1. the use case of modifying the Ractive instance itself (`child.template`) is something that will likely lead to surprising results.\r\n2. storing an abundance of `_`-prefixed attributes in Ractive instances is something I wouldn't be comfortable in.\r\n3. this more than doubles the project size to work on an edge case.\r\n\r\nthis is something that works right now:\r\n\r\n```js\r\nparent.set('child', child);\r\nchild.set('template', 'jade');\r\nparent.get('child.template') === 'jade'\r\n```\r\n\r\nand:\r\n\r\n\r\n```js\r\nparent.set('child', child);\r\nparent.set('child.template', 'jade');\r\nchild.get('template') === 'jade'\r\n```\r\n\r\nand this:\r\n\r\n```js\r\n    it('doesnt bleed to instance properties', function () {\r\n      var original = child.template;\r\n\r\n      parent.set('child', child);\r\n      parent.set('child.template', 'jade');\r\n      expect(child.template).eql(original);\r\n    });\r\n```\r\n\r\nsorry about this, but you're free to open up a fork if you feel this is wrong (i'll even help you)."}}