GitHub PullRequestReviewCommentEvent at 2014-01-25 04:44:14
Repository: website
Actor: stefanpenner
Payload: {"comment":{"url":"https://api.github.com/repos/emberjs/website/pulls/comments/9170243","id":9170243,"diff_hunk":"@@ -33,9 +33,14 @@ var post = store.createRecord('post', {\n   body: 'Lorem ipsum'\n });\n \n-post.save().then(function(post) {\n-  this.transitionToRoute('posts/show', post);\n-});\n+var self = this,\n+    success = function(post) {\n+      self.transitionToRoute('posts/show', post);\n+    }, fail = function() {\n+      // handle the error\n+    };\n+","path":"source/guides/models/persisting-records.md","position":13,"original_position":13,"commit_id":"93241ee880462135c46700eda4eae280a03b373c","original_commit_id":"93241ee880462135c46700eda4eae280a03b373c","user":{"login":"stefanpenner","id":1377,"avatar_url":"https://gravatar.com/avatar/8ccebbc3d28f903d5c214efd3447ac71?d=https%3A%2F%2Fidenticons.github.com%2Ff52378e14237225a6f6c7d802dc6abbd.png&r=x","gravatar_id":"8ccebbc3d28f903d5c214efd3447ac71","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"body":"```js\r\nvar self = this;\r\n\r\nfunction transitionToPost(post) {\r\n  self.transitionToRoute('posts/show', post);\r\n}\r\n\r\nfunction failure(reason) {\r\n  // handle the error\r\n}\r\n\r\npost.save().then(transitionToPost).catch(failure);\r\n```","created_at":"2014-01-25T04:44:14Z","updated_at":"2014-01-25T04:44:14Z","html_url":"https://github.com/emberjs/website/pull/1255#discussion_r9170243","pull_request_url":"https://api.github.com/repos/emberjs/website/pulls/1255","_links":{"self":{"href":"https://api.github.com/repos/emberjs/website/pulls/comments/9170243"},"html":{"href":"https://github.com/emberjs/website/pull/1255#discussion_r9170243"},"pull_request":{"href":"https://api.github.com/repos/emberjs/website/pulls/1255"}}}}