{"action":"created","comment":{"url":"https://api.github.com/repos/abr2001/qna5/pulls/comments/102652388","pull_request_review_id":23411824,"id":102652388,"diff_hunk":"@@ -9,15 +13,26 @@ def new\n \n   def create\n     @question = Question.new(quesion_params)\n+    @question.user = current_user\n     if @question.save\n-      redirect_to @question\n+      redirect_to @question, notice: 'Your question successfully created.'\n     else\n       render :new\n     end\n   end\n \n   def show\n-    @question = Question.find(params[:id])\n+    @answer = Answer.new\n+  end\n+\n+  def destroy\n+    if @question.user == current_user","path":"app/controllers/questions_controller.rb","position":28,"original_position":28,"commit_id":"0d985b380772b8caced98c1264bfc1409e89c745","original_commit_id":"0d985b380772b8caced98c1264bfc1409e89c745","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":"Замени на `User#author_of?`","created_at":"2017-02-23T07:24:13Z","updated_at":"2017-02-23T07:38:54Z","html_url":"https://github.com/abr2001/qna5/pull/3#discussion_r102652388","pull_request_url":"https://api.github.com/repos/abr2001/qna5/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/abr2001/qna5/pulls/comments/102652388"},"html":{"href":"https://github.com/abr2001/qna5/pull/3#discussion_r102652388"},"pull_request":{"href":"https://api.github.com/repos/abr2001/qna5/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/abr2001/qna5/pulls/3","id":107471487,"html_url":"https://github.com/abr2001/qna5/pull/3","diff_url":"https://github.com/abr2001/qna5/pull/3.diff","patch_url":"https://github.com/abr2001/qna5/pull/3.patch","issue_url":"https://api.github.com/repos/abr2001/qna5/issues/3","number":3,"state":"open","locked":false,"title":"Test features","user":{"login":"abr2001","id":736081,"avatar_url":"https://avatars.githubusercontent.com/u/736081?v=3","gravatar_id":"","url":"https://api.github.com/users/abr2001","html_url":"https://github.com/abr2001","followers_url":"https://api.github.com/users/abr2001/followers","following_url":"https://api.github.com/users/abr2001/following{/other_user}","gists_url":"https://api.github.com/users/abr2001/gists{/gist_id}","starred_url":"https://api.github.com/users/abr2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abr2001/subscriptions","organizations_url":"https://api.github.com/users/abr2001/orgs","repos_url":"https://api.github.com/users/abr2001/repos","events_url":"https://api.github.com/users/abr2001/events{/privacy}","received_events_url":"https://api.github.com/users/abr2001/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-22T18:40:51Z","updated_at":"2017-02-23T07:38:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f11674160c49702fede194f2f74af48af92813a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/abr2001/qna5/pulls/3/commits","review_comments_url":"https://api.github.com/repos/abr2001/qna5/pulls/3/comments","review_comment_url":"https://api.github.com/repos/abr2001/qna5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abr2001/qna5/issues/3/comments","statuses_url":"https://api.github.com/repos/abr2001/qna5/statuses/0d985b380772b8caced98c1264bfc1409e89c745","head":{"label":"abr2001:test_features","ref":"test_features","sha":"0d985b380772b8caced98c1264bfc1409e89c745","user":{"login":"abr2001","id":736081,"avatar_url":"https://avatars.githubusercontent.com/u/736081?v=3","gravatar_id":"","url":"https://api.github.com/users/abr2001","html_url":"https://github.com/abr2001","followers_url":"https://api.github.com/users/abr2001/followers","following_url":"https://api.github.com/users/abr2001/following{/other_user}","gists_url":"https://api.github.com/users/abr2001/gists{/gist_id}","starred_url":"https://api.github.com/users/abr2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abr2001/subscriptions","organizations_url":"https://api.github.com/users/abr2001/orgs","repos_url":"https://api.github.com/users/abr2001/repos","events_url":"https://api.github.com/users/abr2001/events{/privacy}","received_events_url":"https://api.github.com/users/abr2001/received_events","type":"User","site_admin":false},"repo":{"id":81655601,"name":"qna5","full_name":"abr2001/qna5","owner":{"login":"abr2001","id":736081,"avatar_url":"https://avatars.githubusercontent.com/u/736081?v=3","gravatar_id":"","url":"https://api.github.com/users/abr2001","html_url":"https://github.com/abr2001","followers_url":"https://api.github.com/users/abr2001/followers","following_url":"https://api.github.com/users/abr2001/following{/other_user}","gists_url":"https://api.github.com/users/abr2001/gists{/gist_id}","starred_url":"https://api.github.com/users/abr2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abr2001/subscriptions","organizations_url":"https://api.github.com/users/abr2001/orgs","repos_url":"https://api.github.com/users/abr2001/repos","events_url":"https://api.github.com/users/abr2001/events{/privacy}","received_events_url":"https://api.github.com/users/abr2001/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abr2001/qna5","description":null,"fork":false,"url":"https://api.github.com/repos/abr2001/qna5","forks_url":"https://api.github.com/repos/abr2001/qna5/forks","keys_url":"https://api.github.com/repos/abr2001/qna5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abr2001/qna5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abr2001/qna5/teams","hooks_url":"https://api.github.com/repos/abr2001/qna5/hooks","issue_events_url":"https://api.github.com/repos/abr2001/qna5/issues/events{/number}","events_url":"https://api.github.com/repos/abr2001/qna5/events","assignees_url":"https://api.github.com/repos/abr2001/qna5/assignees{/user}","branches_url":"https://api.github.com/repos/abr2001/qna5/branches{/branch}","tags_url":"https://api.github.com/repos/abr2001/qna5/tags","blobs_url":"https://api.github.com/repos/abr2001/qna5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abr2001/qna5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abr2001/qna5/git/refs{/sha}","trees_url":"https://api.github.com/repos/abr2001/qna5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abr2001/qna5/statuses/{sha}","languages_url":"https://api.github.com/repos/abr2001/qna5/languages","stargazers_url":"https://api.github.com/repos/abr2001/qna5/stargazers","contributors_url":"https://api.github.com/repos/abr2001/qna5/contributors","subscribers_url":"https://api.github.com/repos/abr2001/qna5/subscribers","subscription_url":"https://api.github.com/repos/abr2001/qna5/subscription","commits_url":"https://api.github.com/repos/abr2001/qna5/commits{/sha}","git_commits_url":"https://api.github.com/repos/abr2001/qna5/git/commits{/sha}","comments_url":"https://api.github.com/repos/abr2001/qna5/comments{/number}","issue_comment_url":"https://api.github.com/repos/abr2001/qna5/issues/comments{/number}","contents_url":"https://api.github.com/repos/abr2001/qna5/contents/{+path}","compare_url":"https://api.github.com/repos/abr2001/qna5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abr2001/qna5/merges","archive_url":"https://api.github.com/repos/abr2001/qna5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abr2001/qna5/downloads","issues_url":"https://api.github.com/repos/abr2001/qna5/issues{/number}","pulls_url":"https://api.github.com/repos/abr2001/qna5/pulls{/number}","milestones_url":"https://api.github.com/repos/abr2001/qna5/milestones{/number}","notifications_url":"https://api.github.com/repos/abr2001/qna5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abr2001/qna5/labels{/name}","releases_url":"https://api.github.com/repos/abr2001/qna5/releases{/id}","deployments_url":"https://api.github.com/repos/abr2001/qna5/deployments","created_at":"2017-02-11T13:45:58Z","updated_at":"2017-02-11T13:48:01Z","pushed_at":"2017-02-22T18:40:52Z","git_url":"git://github.com/abr2001/qna5.git","ssh_url":"git@github.com:abr2001/qna5.git","clone_url":"https://github.com/abr2001/qna5.git","svn_url":"https://github.com/abr2001/qna5","homepage":null,"size":95,"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":"abr2001:master","ref":"master","sha":"19595b23cb4e02b4e16fa59779adb15bdc820d7e","user":{"login":"abr2001","id":736081,"avatar_url":"https://avatars.githubusercontent.com/u/736081?v=3","gravatar_id":"","url":"https://api.github.com/users/abr2001","html_url":"https://github.com/abr2001","followers_url":"https://api.github.com/users/abr2001/followers","following_url":"https://api.github.com/users/abr2001/following{/other_user}","gists_url":"https://api.github.com/users/abr2001/gists{/gist_id}","starred_url":"https://api.github.com/users/abr2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abr2001/subscriptions","organizations_url":"https://api.github.com/users/abr2001/orgs","repos_url":"https://api.github.com/users/abr2001/repos","events_url":"https://api.github.com/users/abr2001/events{/privacy}","received_events_url":"https://api.github.com/users/abr2001/received_events","type":"User","site_admin":false},"repo":{"id":81655601,"name":"qna5","full_name":"abr2001/qna5","owner":{"login":"abr2001","id":736081,"avatar_url":"https://avatars.githubusercontent.com/u/736081?v=3","gravatar_id":"","url":"https://api.github.com/users/abr2001","html_url":"https://github.com/abr2001","followers_url":"https://api.github.com/users/abr2001/followers","following_url":"https://api.github.com/users/abr2001/following{/other_user}","gists_url":"https://api.github.com/users/abr2001/gists{/gist_id}","starred_url":"https://api.github.com/users/abr2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abr2001/subscriptions","organizations_url":"https://api.github.com/users/abr2001/orgs","repos_url":"https://api.github.com/users/abr2001/repos","events_url":"https://api.github.com/users/abr2001/events{/privacy}","received_events_url":"https://api.github.com/users/abr2001/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abr2001/qna5","description":null,"fork":false,"url":"https://api.github.com/repos/abr2001/qna5","forks_url":"https://api.github.com/repos/abr2001/qna5/forks","keys_url":"https://api.github.com/repos/abr2001/qna5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abr2001/qna5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abr2001/qna5/teams","hooks_url":"https://api.github.com/repos/abr2001/qna5/hooks","issue_events_url":"https://api.github.com/repos/abr2001/qna5/issues/events{/number}","events_url":"https://api.github.com/repos/abr2001/qna5/events","assignees_url":"https://api.github.com/repos/abr2001/qna5/assignees{/user}","branches_url":"https://api.github.com/repos/abr2001/qna5/branches{/branch}","tags_url":"https://api.github.com/repos/abr2001/qna5/tags","blobs_url":"https://api.github.com/repos/abr2001/qna5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abr2001/qna5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abr2001/qna5/git/refs{/sha}","trees_url":"https://api.github.com/repos/abr2001/qna5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abr2001/qna5/statuses/{sha}","languages_url":"https://api.github.com/repos/abr2001/qna5/languages","stargazers_url":"https://api.github.com/repos/abr2001/qna5/stargazers","contributors_url":"https://api.github.com/repos/abr2001/qna5/contributors","subscribers_url":"https://api.github.com/repos/abr2001/qna5/subscribers","subscription_url":"https://api.github.com/repos/abr2001/qna5/subscription","commits_url":"https://api.github.com/repos/abr2001/qna5/commits{/sha}","git_commits_url":"https://api.github.com/repos/abr2001/qna5/git/commits{/sha}","comments_url":"https://api.github.com/repos/abr2001/qna5/comments{/number}","issue_comment_url":"https://api.github.com/repos/abr2001/qna5/issues/comments{/number}","contents_url":"https://api.github.com/repos/abr2001/qna5/contents/{+path}","compare_url":"https://api.github.com/repos/abr2001/qna5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abr2001/qna5/merges","archive_url":"https://api.github.com/repos/abr2001/qna5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abr2001/qna5/downloads","issues_url":"https://api.github.com/repos/abr2001/qna5/issues{/number}","pulls_url":"https://api.github.com/repos/abr2001/qna5/pulls{/number}","milestones_url":"https://api.github.com/repos/abr2001/qna5/milestones{/number}","notifications_url":"https://api.github.com/repos/abr2001/qna5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abr2001/qna5/labels{/name}","releases_url":"https://api.github.com/repos/abr2001/qna5/releases{/id}","deployments_url":"https://api.github.com/repos/abr2001/qna5/deployments","created_at":"2017-02-11T13:45:58Z","updated_at":"2017-02-11T13:48:01Z","pushed_at":"2017-02-22T18:40:52Z","git_url":"git://github.com/abr2001/qna5.git","ssh_url":"git@github.com:abr2001/qna5.git","clone_url":"https://github.com/abr2001/qna5.git","svn_url":"https://github.com/abr2001/qna5","homepage":null,"size":95,"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/abr2001/qna5/pulls/3"},"html":{"href":"https://github.com/abr2001/qna5/pull/3"},"issue":{"href":"https://api.github.com/repos/abr2001/qna5/issues/3"},"comments":{"href":"https://api.github.com/repos/abr2001/qna5/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/abr2001/qna5/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/abr2001/qna5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abr2001/qna5/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/abr2001/qna5/statuses/0d985b380772b8caced98c1264bfc1409e89c745"}}}}
{"actor":{"display_login":"vkurennov"}}