{"action":"created","comment":{"url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/comments/47435105","id":47435105,"diff_hunk":"@@ -1,3 +1,14 @@\n # Place all the behaviors and hooks related to the matching controller here.\n # All this logic will automatically be available in application.js.\n # You can use CoffeeScript in this file: http://coffeescript.org/\n+ \n+# $ ->\n+edit_answer = ->\n+  $('.edit-answer-link').click (e) ->\n+  # $('.answers').on 'click', '.edit-answer-link', (e) -> ","path":"app/assets/javascripts/answers.coffee","position":null,"original_position":8,"commit_id":"386ec4e1ce792f4df4057bc69ef43772444ab7f1","original_commit_id":"e4467aac8147ac86bfa8442c473892f7a5826c97","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"Разница в том, что on вешает обработчик и на динамически добавляющиеся ссылки, т.е. если добавили новый ответ, обработчик для него уже есть. А если просто click, то для новых ссылок обработичка не будет, придется дублировать код.","created_at":"2015-12-12T18:38:20Z","updated_at":"2015-12-12T18:38:20Z","html_url":"https://github.com/Khovanov/ror-level-up/pull/5#discussion_r47435105","pull_request_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/comments/47435105"},"html":{"href":"https://github.com/Khovanov/ror-level-up/pull/5#discussion_r47435105"},"pull_request":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5","id":53392712,"html_url":"https://github.com/Khovanov/ror-level-up/pull/5","diff_url":"https://github.com/Khovanov/ror-level-up/pull/5.diff","patch_url":"https://github.com/Khovanov/ror-level-up/pull/5.patch","issue_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/5","number":5,"state":"open","locked":false,"title":"Lesson7","user":{"login":"Khovanov","id":9032614,"avatar_url":"https://avatars.githubusercontent.com/u/9032614?v=3","gravatar_id":"","url":"https://api.github.com/users/Khovanov","html_url":"https://github.com/Khovanov","followers_url":"https://api.github.com/users/Khovanov/followers","following_url":"https://api.github.com/users/Khovanov/following{/other_user}","gists_url":"https://api.github.com/users/Khovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Khovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khovanov/subscriptions","organizations_url":"https://api.github.com/users/Khovanov/orgs","repos_url":"https://api.github.com/users/Khovanov/repos","events_url":"https://api.github.com/users/Khovanov/events{/privacy}","received_events_url":"https://api.github.com/users/Khovanov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-11T13:32:47Z","updated_at":"2015-12-12T18:38:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e3775859f0b32e35fb302604fa2cd5e13a77eda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/5/comments","statuses_url":"https://api.github.com/repos/Khovanov/ror-level-up/statuses/386ec4e1ce792f4df4057bc69ef43772444ab7f1","head":{"label":"Khovanov:lesson7","ref":"lesson7","sha":"386ec4e1ce792f4df4057bc69ef43772444ab7f1","user":{"login":"Khovanov","id":9032614,"avatar_url":"https://avatars.githubusercontent.com/u/9032614?v=3","gravatar_id":"","url":"https://api.github.com/users/Khovanov","html_url":"https://github.com/Khovanov","followers_url":"https://api.github.com/users/Khovanov/followers","following_url":"https://api.github.com/users/Khovanov/following{/other_user}","gists_url":"https://api.github.com/users/Khovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Khovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khovanov/subscriptions","organizations_url":"https://api.github.com/users/Khovanov/orgs","repos_url":"https://api.github.com/users/Khovanov/repos","events_url":"https://api.github.com/users/Khovanov/events{/privacy}","received_events_url":"https://api.github.com/users/Khovanov/received_events","type":"User","site_admin":false},"repo":{"id":45819373,"name":"ror-level-up","full_name":"Khovanov/ror-level-up","owner":{"login":"Khovanov","id":9032614,"avatar_url":"https://avatars.githubusercontent.com/u/9032614?v=3","gravatar_id":"","url":"https://api.github.com/users/Khovanov","html_url":"https://github.com/Khovanov","followers_url":"https://api.github.com/users/Khovanov/followers","following_url":"https://api.github.com/users/Khovanov/following{/other_user}","gists_url":"https://api.github.com/users/Khovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Khovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khovanov/subscriptions","organizations_url":"https://api.github.com/users/Khovanov/orgs","repos_url":"https://api.github.com/users/Khovanov/repos","events_url":"https://api.github.com/users/Khovanov/events{/privacy}","received_events_url":"https://api.github.com/users/Khovanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Khovanov/ror-level-up","description":"thinknetica training","fork":false,"url":"https://api.github.com/repos/Khovanov/ror-level-up","forks_url":"https://api.github.com/repos/Khovanov/ror-level-up/forks","keys_url":"https://api.github.com/repos/Khovanov/ror-level-up/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Khovanov/ror-level-up/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Khovanov/ror-level-up/teams","hooks_url":"https://api.github.com/repos/Khovanov/ror-level-up/hooks","issue_events_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/events{/number}","events_url":"https://api.github.com/repos/Khovanov/ror-level-up/events","assignees_url":"https://api.github.com/repos/Khovanov/ror-level-up/assignees{/user}","branches_url":"https://api.github.com/repos/Khovanov/ror-level-up/branches{/branch}","tags_url":"https://api.github.com/repos/Khovanov/ror-level-up/tags","blobs_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/refs{/sha}","trees_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Khovanov/ror-level-up/statuses/{sha}","languages_url":"https://api.github.com/repos/Khovanov/ror-level-up/languages","stargazers_url":"https://api.github.com/repos/Khovanov/ror-level-up/stargazers","contributors_url":"https://api.github.com/repos/Khovanov/ror-level-up/contributors","subscribers_url":"https://api.github.com/repos/Khovanov/ror-level-up/subscribers","subscription_url":"https://api.github.com/repos/Khovanov/ror-level-up/subscription","commits_url":"https://api.github.com/repos/Khovanov/ror-level-up/commits{/sha}","git_commits_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/commits{/sha}","comments_url":"https://api.github.com/repos/Khovanov/ror-level-up/comments{/number}","issue_comment_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/comments{/number}","contents_url":"https://api.github.com/repos/Khovanov/ror-level-up/contents/{+path}","compare_url":"https://api.github.com/repos/Khovanov/ror-level-up/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Khovanov/ror-level-up/merges","archive_url":"https://api.github.com/repos/Khovanov/ror-level-up/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Khovanov/ror-level-up/downloads","issues_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues{/number}","pulls_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls{/number}","milestones_url":"https://api.github.com/repos/Khovanov/ror-level-up/milestones{/number}","notifications_url":"https://api.github.com/repos/Khovanov/ror-level-up/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Khovanov/ror-level-up/labels{/name}","releases_url":"https://api.github.com/repos/Khovanov/ror-level-up/releases{/id}","created_at":"2015-11-09T06:25:05Z","updated_at":"2015-11-09T18:32:48Z","pushed_at":"2015-12-11T22:33:23Z","git_url":"git://github.com/Khovanov/ror-level-up.git","ssh_url":"git@github.com:Khovanov/ror-level-up.git","clone_url":"https://github.com/Khovanov/ror-level-up.git","svn_url":"https://github.com/Khovanov/ror-level-up","homepage":null,"size":98,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Khovanov:master","ref":"master","sha":"8bb06131981b317146ba8d4e31fb5c58744d9927","user":{"login":"Khovanov","id":9032614,"avatar_url":"https://avatars.githubusercontent.com/u/9032614?v=3","gravatar_id":"","url":"https://api.github.com/users/Khovanov","html_url":"https://github.com/Khovanov","followers_url":"https://api.github.com/users/Khovanov/followers","following_url":"https://api.github.com/users/Khovanov/following{/other_user}","gists_url":"https://api.github.com/users/Khovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Khovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khovanov/subscriptions","organizations_url":"https://api.github.com/users/Khovanov/orgs","repos_url":"https://api.github.com/users/Khovanov/repos","events_url":"https://api.github.com/users/Khovanov/events{/privacy}","received_events_url":"https://api.github.com/users/Khovanov/received_events","type":"User","site_admin":false},"repo":{"id":45819373,"name":"ror-level-up","full_name":"Khovanov/ror-level-up","owner":{"login":"Khovanov","id":9032614,"avatar_url":"https://avatars.githubusercontent.com/u/9032614?v=3","gravatar_id":"","url":"https://api.github.com/users/Khovanov","html_url":"https://github.com/Khovanov","followers_url":"https://api.github.com/users/Khovanov/followers","following_url":"https://api.github.com/users/Khovanov/following{/other_user}","gists_url":"https://api.github.com/users/Khovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Khovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khovanov/subscriptions","organizations_url":"https://api.github.com/users/Khovanov/orgs","repos_url":"https://api.github.com/users/Khovanov/repos","events_url":"https://api.github.com/users/Khovanov/events{/privacy}","received_events_url":"https://api.github.com/users/Khovanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Khovanov/ror-level-up","description":"thinknetica training","fork":false,"url":"https://api.github.com/repos/Khovanov/ror-level-up","forks_url":"https://api.github.com/repos/Khovanov/ror-level-up/forks","keys_url":"https://api.github.com/repos/Khovanov/ror-level-up/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Khovanov/ror-level-up/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Khovanov/ror-level-up/teams","hooks_url":"https://api.github.com/repos/Khovanov/ror-level-up/hooks","issue_events_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/events{/number}","events_url":"https://api.github.com/repos/Khovanov/ror-level-up/events","assignees_url":"https://api.github.com/repos/Khovanov/ror-level-up/assignees{/user}","branches_url":"https://api.github.com/repos/Khovanov/ror-level-up/branches{/branch}","tags_url":"https://api.github.com/repos/Khovanov/ror-level-up/tags","blobs_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/refs{/sha}","trees_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Khovanov/ror-level-up/statuses/{sha}","languages_url":"https://api.github.com/repos/Khovanov/ror-level-up/languages","stargazers_url":"https://api.github.com/repos/Khovanov/ror-level-up/stargazers","contributors_url":"https://api.github.com/repos/Khovanov/ror-level-up/contributors","subscribers_url":"https://api.github.com/repos/Khovanov/ror-level-up/subscribers","subscription_url":"https://api.github.com/repos/Khovanov/ror-level-up/subscription","commits_url":"https://api.github.com/repos/Khovanov/ror-level-up/commits{/sha}","git_commits_url":"https://api.github.com/repos/Khovanov/ror-level-up/git/commits{/sha}","comments_url":"https://api.github.com/repos/Khovanov/ror-level-up/comments{/number}","issue_comment_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues/comments{/number}","contents_url":"https://api.github.com/repos/Khovanov/ror-level-up/contents/{+path}","compare_url":"https://api.github.com/repos/Khovanov/ror-level-up/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Khovanov/ror-level-up/merges","archive_url":"https://api.github.com/repos/Khovanov/ror-level-up/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Khovanov/ror-level-up/downloads","issues_url":"https://api.github.com/repos/Khovanov/ror-level-up/issues{/number}","pulls_url":"https://api.github.com/repos/Khovanov/ror-level-up/pulls{/number}","milestones_url":"https://api.github.com/repos/Khovanov/ror-level-up/milestones{/number}","notifications_url":"https://api.github.com/repos/Khovanov/ror-level-up/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Khovanov/ror-level-up/labels{/name}","releases_url":"https://api.github.com/repos/Khovanov/ror-level-up/releases{/id}","created_at":"2015-11-09T06:25:05Z","updated_at":"2015-11-09T18:32:48Z","pushed_at":"2015-12-11T22:33:23Z","git_url":"git://github.com/Khovanov/ror-level-up.git","ssh_url":"git@github.com:Khovanov/ror-level-up.git","clone_url":"https://github.com/Khovanov/ror-level-up.git","svn_url":"https://github.com/Khovanov/ror-level-up","homepage":null,"size":98,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5"},"html":{"href":"https://github.com/Khovanov/ror-level-up/pull/5"},"issue":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/issues/5"},"comments":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Khovanov/ror-level-up/statuses/386ec4e1ce792f4df4057bc69ef43772444ab7f1"}}}}