{"action":"created","issue":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/1875","labels_url":"https://api.github.com/repos/ractivejs/ractive/issues/1875/labels{/name}","comments_url":"https://api.github.com/repos/ractivejs/ractive/issues/1875/comments","events_url":"https://api.github.com/repos/ractivejs/ractive/issues/1875/events","html_url":"https://github.com/ractivejs/ractive/issues/1875","id":64480807,"number":1875,"title":"Specified model not set on update","user":{"login":"marcelboettcher","id":5868604,"avatar_url":"https://avatars.githubusercontent.com/u/5868604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelboettcher","html_url":"https://github.com/marcelboettcher","followers_url":"https://api.github.com/users/marcelboettcher/followers","following_url":"https://api.github.com/users/marcelboettcher/following{/other_user}","gists_url":"https://api.github.com/users/marcelboettcher/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelboettcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelboettcher/subscriptions","organizations_url":"https://api.github.com/users/marcelboettcher/orgs","repos_url":"https://api.github.com/users/marcelboettcher/repos","events_url":"https://api.github.com/users/marcelboettcher/events{/privacy}","received_events_url":"https://api.github.com/users/marcelboettcher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-26T09:37:39Z","updated_at":"2015-04-12T20:34:12Z","closed_at":null,"body":"Hey guys,\r\n\r\nthanks for the great work!\r\n\r\nI just struggled with a use case where I want to hand plain data objects into the components from the outside, but need some functionality on that data inside the components. So I essentially want to put my data into a model inside the ractive components.\r\nAfter some research on adapters and decorators I found the [Advanced Configuration section](http://docs.ractivejs.org/latest/advanced-configuration) where you describe how to specify your own model. I have a computed property, which does the need the data wrapped into my model. That works in v0.6.1 initially, but not after I update the data from the outside. \r\n\r\nCode: \r\n\r\n```\r\nRactive.components['cod-image'] = Ractive.extend({\r\n\t\tisolated: true,\r\n\t\ttemplate: cod.mustache.image,\r\n\t\tdata: function(data) {\r\n\t\t\tdata.image = new cod.Image(data.image);\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\tsrc: function() {\r\n                               //this should but isn't an instance of cod.Image after update is called\r\n\t\t\t\tvar image = this.get('image');  \r\n\t\t\t\treturn image.getSrc();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n```\r\n\r\nIs that expected behavior and I'm confusing some of your concepts?\r\n\r\nThanks a lot!\r\nMarcel"},"comment":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/comments/92121453","html_url":"https://github.com/ractivejs/ractive/issues/1875#issuecomment-92121453","issue_url":"https://api.github.com/repos/ractivejs/ractive/issues/1875","id":92121453,"user":{"login":"marcelboettcher","id":5868604,"avatar_url":"https://avatars.githubusercontent.com/u/5868604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelboettcher","html_url":"https://github.com/marcelboettcher","followers_url":"https://api.github.com/users/marcelboettcher/followers","following_url":"https://api.github.com/users/marcelboettcher/following{/other_user}","gists_url":"https://api.github.com/users/marcelboettcher/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelboettcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelboettcher/subscriptions","organizations_url":"https://api.github.com/users/marcelboettcher/orgs","repos_url":"https://api.github.com/users/marcelboettcher/repos","events_url":"https://api.github.com/users/marcelboettcher/events{/privacy}","received_events_url":"https://api.github.com/users/marcelboettcher/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T20:34:12Z","updated_at":"2015-04-12T20:34:12Z","body":"thanks, that seems to be what I'm looking for. Just thought that \r\n```\r\nRactive.components['cod-image'] = Ractive.extend({\r\n        data: function(data) {\r\n            data.image = new cod.Image(data.image);\r\n            return data;\r\n        },\r\n...\r\n```\r\nwould be triggered on each update cycle as well.\r\n\r\nThanks a lot!"}}