{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/3789","labels_url":"https://api.github.com/repos/emberjs/data/issues/3789/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/3789/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/3789/events","html_url":"https://github.com/emberjs/data/pull/3789","id":107367098,"number":3789,"title":"Add support to custom getters and setters at DS.attr","user":{"login":"leimig","id":6894491,"avatar_url":"https://avatars.githubusercontent.com/u/6894491?v=3","gravatar_id":"","url":"https://api.github.com/users/leimig","html_url":"https://github.com/leimig","followers_url":"https://api.github.com/users/leimig/followers","following_url":"https://api.github.com/users/leimig/following{/other_user}","gists_url":"https://api.github.com/users/leimig/gists{/gist_id}","starred_url":"https://api.github.com/users/leimig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leimig/subscriptions","organizations_url":"https://api.github.com/users/leimig/orgs","repos_url":"https://api.github.com/users/leimig/repos","events_url":"https://api.github.com/users/leimig/events{/privacy}","received_events_url":"https://api.github.com/users/leimig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-20T02:17:48Z","updated_at":"2015-09-26T01:16:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/emberjs/data/pulls/3789","html_url":"https://github.com/emberjs/data/pull/3789","diff_url":"https://github.com/emberjs/data/pull/3789.diff","patch_url":"https://github.com/emberjs/data/pull/3789.patch"},"body":"Add support to custom getters and setters to Model attributes as suggested by @rmachielse in issue https://github.com/emberjs/data/issues/3708\r\n\r\nThe user now should be able to customize them following the example\r\n```javascript\r\nexport default DS.Model.extend({\r\n  age: DS.attr('number', {\r\n    // value: the stored value of the property age\r\n    get: function(value) {\r\n      var ret;\r\n      // do whatever you want and\r\n      // return the value the user will get\r\n      return ret;\r\n    },\r\n    // value: the new value for property age\r\n    set: function(value) {\r\n      var ret;\r\n      // do whatever you want and\r\n      // return the value that will be stored\r\n      return ret;\r\n    }\r\n  })\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/143388283","html_url":"https://github.com/emberjs/data/pull/3789#issuecomment-143388283","issue_url":"https://api.github.com/repos/emberjs/data/issues/3789","id":143388283,"user":{"login":"leimig","id":6894491,"avatar_url":"https://avatars.githubusercontent.com/u/6894491?v=3","gravatar_id":"","url":"https://api.github.com/users/leimig","html_url":"https://github.com/leimig","followers_url":"https://api.github.com/users/leimig/followers","following_url":"https://api.github.com/users/leimig/following{/other_user}","gists_url":"https://api.github.com/users/leimig/gists{/gist_id}","starred_url":"https://api.github.com/users/leimig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leimig/subscriptions","organizations_url":"https://api.github.com/users/leimig/orgs","repos_url":"https://api.github.com/users/leimig/repos","events_url":"https://api.github.com/users/leimig/events{/privacy}","received_events_url":"https://api.github.com/users/leimig/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T01:16:53Z","updated_at":"2015-09-26T01:16:53Z","body":"I see, thanks for the feedback. I'll close the PR :)"}}