{"action":"created","comment":{"url":"https://api.github.com/repos/yarikov/qna/pulls/comments/45328981","id":45328981,"diff_hunk":"@@ -21,8 +23,21 @@ def create\n     end\n   end\n \n+  def destroy\n+    if @question.user_id == current_user.id","path":"app/controllers/questions_controller.rb","position":28,"original_position":28,"commit_id":"1a5ca08330ad956e85e5ce51f8c15c14d1d82475","original_commit_id":"1a5ca08330ad956e85e5ce51f8c15c14d1d82475","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":"Тут тоже хорошо бы выдать сообщение о недостатке прав, если юзер не может удалить вопрос.","created_at":"2015-11-19T11:27:09Z","updated_at":"2015-11-19T11:27:09Z","html_url":"https://github.com/yarikov/qna/pull/3#discussion_r45328981","pull_request_url":"https://api.github.com/repos/yarikov/qna/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/yarikov/qna/pulls/comments/45328981"},"html":{"href":"https://github.com/yarikov/qna/pull/3#discussion_r45328981"},"pull_request":{"href":"https://api.github.com/repos/yarikov/qna/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/yarikov/qna/pulls/3","id":50954719,"html_url":"https://github.com/yarikov/qna/pull/3","diff_url":"https://github.com/yarikov/qna/pull/3.diff","patch_url":"https://github.com/yarikov/qna/pull/3.patch","issue_url":"https://api.github.com/repos/yarikov/qna/issues/3","number":3,"state":"open","locked":false,"title":"Занятие №5. Acceptance (интеграционное) тестирование.","user":{"login":"yarikov","id":11020624,"avatar_url":"https://avatars.githubusercontent.com/u/11020624?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikov","html_url":"https://github.com/yarikov","followers_url":"https://api.github.com/users/yarikov/followers","following_url":"https://api.github.com/users/yarikov/following{/other_user}","gists_url":"https://api.github.com/users/yarikov/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikov/subscriptions","organizations_url":"https://api.github.com/users/yarikov/orgs","repos_url":"https://api.github.com/users/yarikov/repos","events_url":"https://api.github.com/users/yarikov/events{/privacy}","received_events_url":"https://api.github.com/users/yarikov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-17T14:41:52Z","updated_at":"2015-11-19T11:27:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c4d7e9740d7a8c088f1706c4b694ca74c172bb5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yarikov/qna/pulls/3/commits","review_comments_url":"https://api.github.com/repos/yarikov/qna/pulls/3/comments","review_comment_url":"https://api.github.com/repos/yarikov/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarikov/qna/issues/3/comments","statuses_url":"https://api.github.com/repos/yarikov/qna/statuses/1a5ca08330ad956e85e5ce51f8c15c14d1d82475","head":{"label":"yarikov:lesson_5","ref":"lesson_5","sha":"1a5ca08330ad956e85e5ce51f8c15c14d1d82475","user":{"login":"yarikov","id":11020624,"avatar_url":"https://avatars.githubusercontent.com/u/11020624?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikov","html_url":"https://github.com/yarikov","followers_url":"https://api.github.com/users/yarikov/followers","following_url":"https://api.github.com/users/yarikov/following{/other_user}","gists_url":"https://api.github.com/users/yarikov/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikov/subscriptions","organizations_url":"https://api.github.com/users/yarikov/orgs","repos_url":"https://api.github.com/users/yarikov/repos","events_url":"https://api.github.com/users/yarikov/events{/privacy}","received_events_url":"https://api.github.com/users/yarikov/received_events","type":"User","site_admin":false},"repo":{"id":45825482,"name":"qna","full_name":"yarikov/qna","owner":{"login":"yarikov","id":11020624,"avatar_url":"https://avatars.githubusercontent.com/u/11020624?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikov","html_url":"https://github.com/yarikov","followers_url":"https://api.github.com/users/yarikov/followers","following_url":"https://api.github.com/users/yarikov/following{/other_user}","gists_url":"https://api.github.com/users/yarikov/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikov/subscriptions","organizations_url":"https://api.github.com/users/yarikov/orgs","repos_url":"https://api.github.com/users/yarikov/repos","events_url":"https://api.github.com/users/yarikov/events{/privacy}","received_events_url":"https://api.github.com/users/yarikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yarikov/qna","description":"","fork":false,"url":"https://api.github.com/repos/yarikov/qna","forks_url":"https://api.github.com/repos/yarikov/qna/forks","keys_url":"https://api.github.com/repos/yarikov/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarikov/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarikov/qna/teams","hooks_url":"https://api.github.com/repos/yarikov/qna/hooks","issue_events_url":"https://api.github.com/repos/yarikov/qna/issues/events{/number}","events_url":"https://api.github.com/repos/yarikov/qna/events","assignees_url":"https://api.github.com/repos/yarikov/qna/assignees{/user}","branches_url":"https://api.github.com/repos/yarikov/qna/branches{/branch}","tags_url":"https://api.github.com/repos/yarikov/qna/tags","blobs_url":"https://api.github.com/repos/yarikov/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarikov/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarikov/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarikov/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarikov/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/yarikov/qna/languages","stargazers_url":"https://api.github.com/repos/yarikov/qna/stargazers","contributors_url":"https://api.github.com/repos/yarikov/qna/contributors","subscribers_url":"https://api.github.com/repos/yarikov/qna/subscribers","subscription_url":"https://api.github.com/repos/yarikov/qna/subscription","commits_url":"https://api.github.com/repos/yarikov/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarikov/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarikov/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarikov/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarikov/qna/contents/{+path}","compare_url":"https://api.github.com/repos/yarikov/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarikov/qna/merges","archive_url":"https://api.github.com/repos/yarikov/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarikov/qna/downloads","issues_url":"https://api.github.com/repos/yarikov/qna/issues{/number}","pulls_url":"https://api.github.com/repos/yarikov/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/yarikov/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/yarikov/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarikov/qna/labels{/name}","releases_url":"https://api.github.com/repos/yarikov/qna/releases{/id}","created_at":"2015-11-09T08:36:27Z","updated_at":"2015-11-09T08:44:01Z","pushed_at":"2015-11-19T08:39:52Z","git_url":"git://github.com/yarikov/qna.git","ssh_url":"git@github.com:yarikov/qna.git","clone_url":"https://github.com/yarikov/qna.git","svn_url":"https://github.com/yarikov/qna","homepage":null,"size":73,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"yarikov:master","ref":"master","sha":"6291a1982d8cff90552edf5c2cf7dee34a2b50d4","user":{"login":"yarikov","id":11020624,"avatar_url":"https://avatars.githubusercontent.com/u/11020624?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikov","html_url":"https://github.com/yarikov","followers_url":"https://api.github.com/users/yarikov/followers","following_url":"https://api.github.com/users/yarikov/following{/other_user}","gists_url":"https://api.github.com/users/yarikov/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikov/subscriptions","organizations_url":"https://api.github.com/users/yarikov/orgs","repos_url":"https://api.github.com/users/yarikov/repos","events_url":"https://api.github.com/users/yarikov/events{/privacy}","received_events_url":"https://api.github.com/users/yarikov/received_events","type":"User","site_admin":false},"repo":{"id":45825482,"name":"qna","full_name":"yarikov/qna","owner":{"login":"yarikov","id":11020624,"avatar_url":"https://avatars.githubusercontent.com/u/11020624?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikov","html_url":"https://github.com/yarikov","followers_url":"https://api.github.com/users/yarikov/followers","following_url":"https://api.github.com/users/yarikov/following{/other_user}","gists_url":"https://api.github.com/users/yarikov/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikov/subscriptions","organizations_url":"https://api.github.com/users/yarikov/orgs","repos_url":"https://api.github.com/users/yarikov/repos","events_url":"https://api.github.com/users/yarikov/events{/privacy}","received_events_url":"https://api.github.com/users/yarikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yarikov/qna","description":"","fork":false,"url":"https://api.github.com/repos/yarikov/qna","forks_url":"https://api.github.com/repos/yarikov/qna/forks","keys_url":"https://api.github.com/repos/yarikov/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarikov/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarikov/qna/teams","hooks_url":"https://api.github.com/repos/yarikov/qna/hooks","issue_events_url":"https://api.github.com/repos/yarikov/qna/issues/events{/number}","events_url":"https://api.github.com/repos/yarikov/qna/events","assignees_url":"https://api.github.com/repos/yarikov/qna/assignees{/user}","branches_url":"https://api.github.com/repos/yarikov/qna/branches{/branch}","tags_url":"https://api.github.com/repos/yarikov/qna/tags","blobs_url":"https://api.github.com/repos/yarikov/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarikov/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarikov/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarikov/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarikov/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/yarikov/qna/languages","stargazers_url":"https://api.github.com/repos/yarikov/qna/stargazers","contributors_url":"https://api.github.com/repos/yarikov/qna/contributors","subscribers_url":"https://api.github.com/repos/yarikov/qna/subscribers","subscription_url":"https://api.github.com/repos/yarikov/qna/subscription","commits_url":"https://api.github.com/repos/yarikov/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarikov/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarikov/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarikov/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarikov/qna/contents/{+path}","compare_url":"https://api.github.com/repos/yarikov/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarikov/qna/merges","archive_url":"https://api.github.com/repos/yarikov/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarikov/qna/downloads","issues_url":"https://api.github.com/repos/yarikov/qna/issues{/number}","pulls_url":"https://api.github.com/repos/yarikov/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/yarikov/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/yarikov/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarikov/qna/labels{/name}","releases_url":"https://api.github.com/repos/yarikov/qna/releases{/id}","created_at":"2015-11-09T08:36:27Z","updated_at":"2015-11-09T08:44:01Z","pushed_at":"2015-11-19T08:39:52Z","git_url":"git://github.com/yarikov/qna.git","ssh_url":"git@github.com:yarikov/qna.git","clone_url":"https://github.com/yarikov/qna.git","svn_url":"https://github.com/yarikov/qna","homepage":null,"size":73,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yarikov/qna/pulls/3"},"html":{"href":"https://github.com/yarikov/qna/pull/3"},"issue":{"href":"https://api.github.com/repos/yarikov/qna/issues/3"},"comments":{"href":"https://api.github.com/repos/yarikov/qna/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/yarikov/qna/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/yarikov/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarikov/qna/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/yarikov/qna/statuses/1a5ca08330ad956e85e5ce51f8c15c14d1d82475"}}}}