{"action":"created","comment":{"url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/comments/59331748","id":59331748,"diff_hunk":"@@ -0,0 +1,67 @@\n+var BeerView = Backbone.View.extend({\r\n+\r\n+  template: $('#beer-template'),\r\n+\r\n+  events: {\r\n+    'click .remove-beer': 'delete',\r\n+    'dblclick .name': 'toggleEditName',\r\n+    'click .name-edit-submit' : 'editName',\r\n+    'click .rate-submit': 'addRating'\r\n+  },\r\n+\r\n+  initialize: function(){\r\n+    this.listenTo(this.model, 'change:name', this.reName);\r\n+    this.listenTo(this.model, 'change:ratings', this.reAvg);\r\n+    this.listenTo(this.model, 'change:avgRate', this.renderAvg);\r\n+  },\r\n+\r\n+  render: function(){\r\n+    var template = Handlebars.compile(this.template.html());\r\n+\r\n+    this.$el.html(template(this.model.toJSON()));\r\n+\r\n+    return this;\r\n+  },\r\n+\r\n+  delete: function(){\r\n+    this.model.collection.remove(this.model);\r\n+    this.remove();\r\n+  },\r\n+\r\n+  toggleEditName: function(){\r\n+    this.$el.find('.name-li').toggleClass('editing');\r","path":"views/BeerView.js","position":32,"original_position":32,"commit_id":"f11fb936af1758a9dabc93626465edbf2b984b88","original_commit_id":"f11fb936af1758a9dabc93626465edbf2b984b88","user":{"login":"amhayslip","id":5480326,"avatar_url":"https://avatars.githubusercontent.com/u/5480326?v=3","gravatar_id":"","url":"https://api.github.com/users/amhayslip","html_url":"https://github.com/amhayslip","followers_url":"https://api.github.com/users/amhayslip/followers","following_url":"https://api.github.com/users/amhayslip/following{/other_user}","gists_url":"https://api.github.com/users/amhayslip/gists{/gist_id}","starred_url":"https://api.github.com/users/amhayslip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amhayslip/subscriptions","organizations_url":"https://api.github.com/users/amhayslip/orgs","repos_url":"https://api.github.com/users/amhayslip/repos","events_url":"https://api.github.com/users/amhayslip/events{/privacy}","received_events_url":"https://api.github.com/users/amhayslip/received_events","type":"User","site_admin":false},"body":"I'd first modify the model instead of directly changing the DOM here. For instance, toggle an attribute called `edit_mode` or something.","created_at":"2016-04-12T07:29:42Z","updated_at":"2016-04-12T07:29:42Z","html_url":"https://github.com/Elevationacademy/beerList/pull/1#discussion_r59331748","pull_request_url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/comments/59331748"},"html":{"href":"https://github.com/Elevationacademy/beerList/pull/1#discussion_r59331748"},"pull_request":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1","id":65983777,"html_url":"https://github.com/Elevationacademy/beerList/pull/1","diff_url":"https://github.com/Elevationacademy/beerList/pull/1.diff","patch_url":"https://github.com/Elevationacademy/beerList/pull/1.patch","issue_url":"https://api.github.com/repos/Elevationacademy/beerList/issues/1","number":1,"state":"open","locked":false,"title":"before extenstions","user":{"login":"Temereru","id":17434097,"avatar_url":"https://avatars.githubusercontent.com/u/17434097?v=3","gravatar_id":"","url":"https://api.github.com/users/Temereru","html_url":"https://github.com/Temereru","followers_url":"https://api.github.com/users/Temereru/followers","following_url":"https://api.github.com/users/Temereru/following{/other_user}","gists_url":"https://api.github.com/users/Temereru/gists{/gist_id}","starred_url":"https://api.github.com/users/Temereru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temereru/subscriptions","organizations_url":"https://api.github.com/users/Temereru/orgs","repos_url":"https://api.github.com/users/Temereru/repos","events_url":"https://api.github.com/users/Temereru/events{/privacy}","received_events_url":"https://api.github.com/users/Temereru/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-11T12:17:27Z","updated_at":"2016-04-12T07:29:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e326189a540e6cf6bf9cb7c01049da63cc3df95","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Elevationacademy/beerList/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Elevationacademy/beerList/issues/1/comments","statuses_url":"https://api.github.com/repos/Elevationacademy/beerList/statuses/f11fb936af1758a9dabc93626465edbf2b984b88","head":{"label":"Temereru:master","ref":"master","sha":"f11fb936af1758a9dabc93626465edbf2b984b88","user":{"login":"Temereru","id":17434097,"avatar_url":"https://avatars.githubusercontent.com/u/17434097?v=3","gravatar_id":"","url":"https://api.github.com/users/Temereru","html_url":"https://github.com/Temereru","followers_url":"https://api.github.com/users/Temereru/followers","following_url":"https://api.github.com/users/Temereru/following{/other_user}","gists_url":"https://api.github.com/users/Temereru/gists{/gist_id}","starred_url":"https://api.github.com/users/Temereru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temereru/subscriptions","organizations_url":"https://api.github.com/users/Temereru/orgs","repos_url":"https://api.github.com/users/Temereru/repos","events_url":"https://api.github.com/users/Temereru/events{/privacy}","received_events_url":"https://api.github.com/users/Temereru/received_events","type":"User","site_admin":false},"repo":{"id":55961597,"name":"beerList","full_name":"Temereru/beerList","owner":{"login":"Temereru","id":17434097,"avatar_url":"https://avatars.githubusercontent.com/u/17434097?v=3","gravatar_id":"","url":"https://api.github.com/users/Temereru","html_url":"https://github.com/Temereru","followers_url":"https://api.github.com/users/Temereru/followers","following_url":"https://api.github.com/users/Temereru/following{/other_user}","gists_url":"https://api.github.com/users/Temereru/gists{/gist_id}","starred_url":"https://api.github.com/users/Temereru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temereru/subscriptions","organizations_url":"https://api.github.com/users/Temereru/orgs","repos_url":"https://api.github.com/users/Temereru/repos","events_url":"https://api.github.com/users/Temereru/events{/privacy}","received_events_url":"https://api.github.com/users/Temereru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Temereru/beerList","description":"","fork":true,"url":"https://api.github.com/repos/Temereru/beerList","forks_url":"https://api.github.com/repos/Temereru/beerList/forks","keys_url":"https://api.github.com/repos/Temereru/beerList/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Temereru/beerList/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Temereru/beerList/teams","hooks_url":"https://api.github.com/repos/Temereru/beerList/hooks","issue_events_url":"https://api.github.com/repos/Temereru/beerList/issues/events{/number}","events_url":"https://api.github.com/repos/Temereru/beerList/events","assignees_url":"https://api.github.com/repos/Temereru/beerList/assignees{/user}","branches_url":"https://api.github.com/repos/Temereru/beerList/branches{/branch}","tags_url":"https://api.github.com/repos/Temereru/beerList/tags","blobs_url":"https://api.github.com/repos/Temereru/beerList/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Temereru/beerList/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Temereru/beerList/git/refs{/sha}","trees_url":"https://api.github.com/repos/Temereru/beerList/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Temereru/beerList/statuses/{sha}","languages_url":"https://api.github.com/repos/Temereru/beerList/languages","stargazers_url":"https://api.github.com/repos/Temereru/beerList/stargazers","contributors_url":"https://api.github.com/repos/Temereru/beerList/contributors","subscribers_url":"https://api.github.com/repos/Temereru/beerList/subscribers","subscription_url":"https://api.github.com/repos/Temereru/beerList/subscription","commits_url":"https://api.github.com/repos/Temereru/beerList/commits{/sha}","git_commits_url":"https://api.github.com/repos/Temereru/beerList/git/commits{/sha}","comments_url":"https://api.github.com/repos/Temereru/beerList/comments{/number}","issue_comment_url":"https://api.github.com/repos/Temereru/beerList/issues/comments{/number}","contents_url":"https://api.github.com/repos/Temereru/beerList/contents/{+path}","compare_url":"https://api.github.com/repos/Temereru/beerList/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Temereru/beerList/merges","archive_url":"https://api.github.com/repos/Temereru/beerList/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Temereru/beerList/downloads","issues_url":"https://api.github.com/repos/Temereru/beerList/issues{/number}","pulls_url":"https://api.github.com/repos/Temereru/beerList/pulls{/number}","milestones_url":"https://api.github.com/repos/Temereru/beerList/milestones{/number}","notifications_url":"https://api.github.com/repos/Temereru/beerList/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Temereru/beerList/labels{/name}","releases_url":"https://api.github.com/repos/Temereru/beerList/releases{/id}","deployments_url":"https://api.github.com/repos/Temereru/beerList/deployments","created_at":"2016-04-11T10:04:07Z","updated_at":"2016-04-11T12:17:13Z","pushed_at":"2016-04-11T13:04:09Z","git_url":"git://github.com/Temereru/beerList.git","ssh_url":"git@github.com:Temereru/beerList.git","clone_url":"https://github.com/Temereru/beerList.git","svn_url":"https://github.com/Temereru/beerList","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Elevationacademy:master","ref":"master","sha":"7e417a6fead1faa714a0a3d7ac5102315c6f47a3","user":{"login":"Elevationacademy","id":17311422,"avatar_url":"https://avatars.githubusercontent.com/u/17311422?v=3","gravatar_id":"","url":"https://api.github.com/users/Elevationacademy","html_url":"https://github.com/Elevationacademy","followers_url":"https://api.github.com/users/Elevationacademy/followers","following_url":"https://api.github.com/users/Elevationacademy/following{/other_user}","gists_url":"https://api.github.com/users/Elevationacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/Elevationacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elevationacademy/subscriptions","organizations_url":"https://api.github.com/users/Elevationacademy/orgs","repos_url":"https://api.github.com/users/Elevationacademy/repos","events_url":"https://api.github.com/users/Elevationacademy/events{/privacy}","received_events_url":"https://api.github.com/users/Elevationacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":55940433,"name":"beerList","full_name":"Elevationacademy/beerList","owner":{"login":"Elevationacademy","id":17311422,"avatar_url":"https://avatars.githubusercontent.com/u/17311422?v=3","gravatar_id":"","url":"https://api.github.com/users/Elevationacademy","html_url":"https://github.com/Elevationacademy","followers_url":"https://api.github.com/users/Elevationacademy/followers","following_url":"https://api.github.com/users/Elevationacademy/following{/other_user}","gists_url":"https://api.github.com/users/Elevationacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/Elevationacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elevationacademy/subscriptions","organizations_url":"https://api.github.com/users/Elevationacademy/orgs","repos_url":"https://api.github.com/users/Elevationacademy/repos","events_url":"https://api.github.com/users/Elevationacademy/events{/privacy}","received_events_url":"https://api.github.com/users/Elevationacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elevationacademy/beerList","description":"","fork":false,"url":"https://api.github.com/repos/Elevationacademy/beerList","forks_url":"https://api.github.com/repos/Elevationacademy/beerList/forks","keys_url":"https://api.github.com/repos/Elevationacademy/beerList/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elevationacademy/beerList/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elevationacademy/beerList/teams","hooks_url":"https://api.github.com/repos/Elevationacademy/beerList/hooks","issue_events_url":"https://api.github.com/repos/Elevationacademy/beerList/issues/events{/number}","events_url":"https://api.github.com/repos/Elevationacademy/beerList/events","assignees_url":"https://api.github.com/repos/Elevationacademy/beerList/assignees{/user}","branches_url":"https://api.github.com/repos/Elevationacademy/beerList/branches{/branch}","tags_url":"https://api.github.com/repos/Elevationacademy/beerList/tags","blobs_url":"https://api.github.com/repos/Elevationacademy/beerList/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elevationacademy/beerList/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elevationacademy/beerList/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elevationacademy/beerList/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elevationacademy/beerList/statuses/{sha}","languages_url":"https://api.github.com/repos/Elevationacademy/beerList/languages","stargazers_url":"https://api.github.com/repos/Elevationacademy/beerList/stargazers","contributors_url":"https://api.github.com/repos/Elevationacademy/beerList/contributors","subscribers_url":"https://api.github.com/repos/Elevationacademy/beerList/subscribers","subscription_url":"https://api.github.com/repos/Elevationacademy/beerList/subscription","commits_url":"https://api.github.com/repos/Elevationacademy/beerList/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elevationacademy/beerList/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elevationacademy/beerList/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elevationacademy/beerList/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elevationacademy/beerList/contents/{+path}","compare_url":"https://api.github.com/repos/Elevationacademy/beerList/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elevationacademy/beerList/merges","archive_url":"https://api.github.com/repos/Elevationacademy/beerList/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elevationacademy/beerList/downloads","issues_url":"https://api.github.com/repos/Elevationacademy/beerList/issues{/number}","pulls_url":"https://api.github.com/repos/Elevationacademy/beerList/pulls{/number}","milestones_url":"https://api.github.com/repos/Elevationacademy/beerList/milestones{/number}","notifications_url":"https://api.github.com/repos/Elevationacademy/beerList/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elevationacademy/beerList/labels{/name}","releases_url":"https://api.github.com/repos/Elevationacademy/beerList/releases{/id}","deployments_url":"https://api.github.com/repos/Elevationacademy/beerList/deployments","created_at":"2016-04-11T04:00:26Z","updated_at":"2016-04-11T04:00:44Z","pushed_at":"2016-04-11T20:44:47Z","git_url":"git://github.com/Elevationacademy/beerList.git","ssh_url":"git@github.com:Elevationacademy/beerList.git","clone_url":"https://github.com/Elevationacademy/beerList.git","svn_url":"https://github.com/Elevationacademy/beerList","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":4,"forks":12,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1"},"html":{"href":"https://github.com/Elevationacademy/beerList/pull/1"},"issue":{"href":"https://api.github.com/repos/Elevationacademy/beerList/issues/1"},"comments":{"href":"https://api.github.com/repos/Elevationacademy/beerList/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Elevationacademy/beerList/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Elevationacademy/beerList/statuses/f11fb936af1758a9dabc93626465edbf2b984b88"}}}}