{"action":"created","comment":{"url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments/80721642","pull_request_review_id":1758033,"id":80721642,"diff_hunk":"@@ -0,0 +1,48 @@\n+class CommentsController < ApplicationController\n+  before_action :authenticate_user!\n+  before_action :load_comment, only: [:update, :destroy]\n+  before_action :load_commentable, only: [:create]\n+  \n+  def create\n+    @comment = @commentable.comments.build(comment_params.merge(user_id: current_user.id))\n+    respond_to do |format|\n+      if @comment.save\n+        format.js do","path":"app/controllers/comments_controller.rb","position":10,"original_position":10,"commit_id":"455ad88a449e804c01c97ea97cba56e6bff04bc0","original_commit_id":"455ad88a449e804c01c97ea97cba56e6bff04bc0","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":"Если у тебя только format.js, то зачем вообще делать respond_to? Он нужен, когда одновременно несколько форматов поддерживается","created_at":"2016-09-27T15:32:10Z","updated_at":"2016-09-27T15:44:53Z","html_url":"https://github.com/abozhiy/TN_Sample_App/pull/8#discussion_r80721642","pull_request_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments/80721642"},"html":{"href":"https://github.com/abozhiy/TN_Sample_App/pull/8#discussion_r80721642"},"pull_request":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8","id":86322627,"html_url":"https://github.com/abozhiy/TN_Sample_App/pull/8","diff_url":"https://github.com/abozhiy/TN_Sample_App/pull/8.diff","patch_url":"https://github.com/abozhiy/TN_Sample_App/pull/8.patch","issue_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/8","number":8,"state":"open","locked":false,"title":"comet-pub-sub","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-22T11:48:48Z","updated_at":"2016-09-27T15:44:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73ca1c68d51c38fc7b096e762145fe66bd3d44cf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8/commits","review_comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8/comments","review_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/8/comments","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/455ad88a449e804c01c97ea97cba56e6bff04bc0","head":{"label":"abozhiy:comet-pub-sub","ref":"comet-pub-sub","sha":"455ad88a449e804c01c97ea97cba56e6bff04bc0","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"repo":{"id":65312098,"name":"TN_Sample_App","full_name":"abozhiy/TN_Sample_App","owner":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abozhiy/TN_Sample_App","description":null,"fork":false,"url":"https://api.github.com/repos/abozhiy/TN_Sample_App","forks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/forks","keys_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/teams","hooks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/hooks","issue_events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/events{/number}","events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/events","assignees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/assignees{/user}","branches_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/branches{/branch}","tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/tags","blobs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/{sha}","languages_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/languages","stargazers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/stargazers","contributors_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contributors","subscribers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscribers","subscription_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscription","commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contents/{+path}","compare_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/merges","archive_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/downloads","issues_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues{/number}","pulls_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls{/number}","milestones_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/milestones{/number}","notifications_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/labels{/name}","releases_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/releases{/id}","deployments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/deployments","created_at":"2016-08-09T16:49:47Z","updated_at":"2016-08-09T16:50:16Z","pushed_at":"2016-09-27T11:44:30Z","git_url":"git://github.com/abozhiy/TN_Sample_App.git","ssh_url":"git@github.com:abozhiy/TN_Sample_App.git","clone_url":"https://github.com/abozhiy/TN_Sample_App.git","svn_url":"https://github.com/abozhiy/TN_Sample_App","homepage":null,"size":414,"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":"abozhiy:master","ref":"master","sha":"ece350d6d6d66f379aa7e36f63fbc4db7c0fe2c7","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"repo":{"id":65312098,"name":"TN_Sample_App","full_name":"abozhiy/TN_Sample_App","owner":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abozhiy/TN_Sample_App","description":null,"fork":false,"url":"https://api.github.com/repos/abozhiy/TN_Sample_App","forks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/forks","keys_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/teams","hooks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/hooks","issue_events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/events{/number}","events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/events","assignees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/assignees{/user}","branches_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/branches{/branch}","tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/tags","blobs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/{sha}","languages_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/languages","stargazers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/stargazers","contributors_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contributors","subscribers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscribers","subscription_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscription","commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contents/{+path}","compare_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/merges","archive_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/downloads","issues_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues{/number}","pulls_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls{/number}","milestones_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/milestones{/number}","notifications_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/labels{/name}","releases_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/releases{/id}","deployments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/deployments","created_at":"2016-08-09T16:49:47Z","updated_at":"2016-08-09T16:50:16Z","pushed_at":"2016-09-27T11:44:30Z","git_url":"git://github.com/abozhiy/TN_Sample_App.git","ssh_url":"git@github.com:abozhiy/TN_Sample_App.git","clone_url":"https://github.com/abozhiy/TN_Sample_App.git","svn_url":"https://github.com/abozhiy/TN_Sample_App","homepage":null,"size":414,"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/abozhiy/TN_Sample_App/pulls/8"},"html":{"href":"https://github.com/abozhiy/TN_Sample_App/pull/8"},"issue":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/8"},"comments":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/455ad88a449e804c01c97ea97cba56e6bff04bc0"}}}}
{"actor":{"display_login":"vkurennov"}}