{"action":"created","comment":{"url":"https://api.github.com/repos/oozywaters/test-guru/pulls/comments/175289523","pull_request_review_id":104797580,"id":175289523,"diff_hunk":"@@ -0,0 +1,46 @@\n+class QuestionsController < ApplicationController\n+  before_action :find_test, only: %i[index new create]\n+  before_action :find_question, only: %i[show destroy edit update]\n+\n+  rescue_from ActiveRecord::RecordNotFound, with: :rescue_with_question_not_found\n+\n+  def index; end\n+\n+  def new\n+    @question = @test.questions.build\n+  end\n+\n+  def create\n+    @question = @test.questions.build(question_params)\n+\n+    if @question.save\n+      redirect_to test_questions_path(@test)\n+    else\n+      render :new\n+    end\n+  end\n+\n+  def destroy\n+    @question.destroy\n+    redirect_to test_path(@question.test)\n+    flash[:notice] = 'Question removed successfully'","path":"app/controllers/questions_controller.rb","position":26,"original_position":26,"commit_id":"3e91eae40a87c9cb6903b2266cfc37e3dc43c52c","original_commit_id":"3e91eae40a87c9cb6903b2266cfc37e3dc43c52c","user":{"login":"iBublik","id":11278497,"avatar_url":"https://avatars1.githubusercontent.com/u/11278497?v=4","gravatar_id":"","url":"https://api.github.com/users/iBublik","html_url":"https://github.com/iBublik","followers_url":"https://api.github.com/users/iBublik/followers","following_url":"https://api.github.com/users/iBublik/following{/other_user}","gists_url":"https://api.github.com/users/iBublik/gists{/gist_id}","starred_url":"https://api.github.com/users/iBublik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iBublik/subscriptions","organizations_url":"https://api.github.com/users/iBublik/orgs","repos_url":"https://api.github.com/users/iBublik/repos","events_url":"https://api.github.com/users/iBublik/events{/privacy}","received_events_url":"https://api.github.com/users/iBublik/received_events","type":"User","site_admin":false},"body":"Можно прямо в редиректе указывать notice-ы - `redirecto_to ..., notice: '...'`","created_at":"2018-03-18T13:36:15Z","updated_at":"2018-03-18T13:46:47Z","html_url":"https://github.com/oozywaters/test-guru/pull/6#discussion_r175289523","pull_request_url":"https://api.github.com/repos/oozywaters/test-guru/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/comments/175289523"},"html":{"href":"https://github.com/oozywaters/test-guru/pull/6#discussion_r175289523"},"pull_request":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/oozywaters/test-guru/pulls/6","id":175589986,"html_url":"https://github.com/oozywaters/test-guru/pull/6","diff_url":"https://github.com/oozywaters/test-guru/pull/6.diff","patch_url":"https://github.com/oozywaters/test-guru/pull/6.patch","issue_url":"https://api.github.com/repos/oozywaters/test-guru/issues/6","number":6,"state":"open","locked":false,"title":"App controllers","user":{"login":"oozywaters","id":6844772,"avatar_url":"https://avatars0.githubusercontent.com/u/6844772?v=4","gravatar_id":"","url":"https://api.github.com/users/oozywaters","html_url":"https://github.com/oozywaters","followers_url":"https://api.github.com/users/oozywaters/followers","following_url":"https://api.github.com/users/oozywaters/following{/other_user}","gists_url":"https://api.github.com/users/oozywaters/gists{/gist_id}","starred_url":"https://api.github.com/users/oozywaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oozywaters/subscriptions","organizations_url":"https://api.github.com/users/oozywaters/orgs","repos_url":"https://api.github.com/users/oozywaters/repos","events_url":"https://api.github.com/users/oozywaters/events{/privacy}","received_events_url":"https://api.github.com/users/oozywaters/received_events","type":"User","site_admin":false},"body":"Changes:\r\n\r\n- Add questions list view\r\n- Add question details view\r\n- Add create question form\r\n- Add destroy question method\r\n- Add method callbacks to QuestionController\r\n- Add exception handler for question not found","created_at":"2018-03-16T16:53:04Z","updated_at":"2018-03-18T13:46:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fd1657d5df32425cc41bb1a3f0c27f340469f79","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oozywaters/test-guru/pulls/6/commits","review_comments_url":"https://api.github.com/repos/oozywaters/test-guru/pulls/6/comments","review_comment_url":"https://api.github.com/repos/oozywaters/test-guru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oozywaters/test-guru/issues/6/comments","statuses_url":"https://api.github.com/repos/oozywaters/test-guru/statuses/3e91eae40a87c9cb6903b2266cfc37e3dc43c52c","head":{"label":"oozywaters:dev","ref":"dev","sha":"3e91eae40a87c9cb6903b2266cfc37e3dc43c52c","user":{"login":"oozywaters","id":6844772,"avatar_url":"https://avatars0.githubusercontent.com/u/6844772?v=4","gravatar_id":"","url":"https://api.github.com/users/oozywaters","html_url":"https://github.com/oozywaters","followers_url":"https://api.github.com/users/oozywaters/followers","following_url":"https://api.github.com/users/oozywaters/following{/other_user}","gists_url":"https://api.github.com/users/oozywaters/gists{/gist_id}","starred_url":"https://api.github.com/users/oozywaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oozywaters/subscriptions","organizations_url":"https://api.github.com/users/oozywaters/orgs","repos_url":"https://api.github.com/users/oozywaters/repos","events_url":"https://api.github.com/users/oozywaters/events{/privacy}","received_events_url":"https://api.github.com/users/oozywaters/received_events","type":"User","site_admin":false},"repo":{"id":122455867,"name":"test-guru","full_name":"oozywaters/test-guru","owner":{"login":"oozywaters","id":6844772,"avatar_url":"https://avatars0.githubusercontent.com/u/6844772?v=4","gravatar_id":"","url":"https://api.github.com/users/oozywaters","html_url":"https://github.com/oozywaters","followers_url":"https://api.github.com/users/oozywaters/followers","following_url":"https://api.github.com/users/oozywaters/following{/other_user}","gists_url":"https://api.github.com/users/oozywaters/gists{/gist_id}","starred_url":"https://api.github.com/users/oozywaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oozywaters/subscriptions","organizations_url":"https://api.github.com/users/oozywaters/orgs","repos_url":"https://api.github.com/users/oozywaters/repos","events_url":"https://api.github.com/users/oozywaters/events{/privacy}","received_events_url":"https://api.github.com/users/oozywaters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oozywaters/test-guru","description":null,"fork":false,"url":"https://api.github.com/repos/oozywaters/test-guru","forks_url":"https://api.github.com/repos/oozywaters/test-guru/forks","keys_url":"https://api.github.com/repos/oozywaters/test-guru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oozywaters/test-guru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oozywaters/test-guru/teams","hooks_url":"https://api.github.com/repos/oozywaters/test-guru/hooks","issue_events_url":"https://api.github.com/repos/oozywaters/test-guru/issues/events{/number}","events_url":"https://api.github.com/repos/oozywaters/test-guru/events","assignees_url":"https://api.github.com/repos/oozywaters/test-guru/assignees{/user}","branches_url":"https://api.github.com/repos/oozywaters/test-guru/branches{/branch}","tags_url":"https://api.github.com/repos/oozywaters/test-guru/tags","blobs_url":"https://api.github.com/repos/oozywaters/test-guru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oozywaters/test-guru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oozywaters/test-guru/git/refs{/sha}","trees_url":"https://api.github.com/repos/oozywaters/test-guru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oozywaters/test-guru/statuses/{sha}","languages_url":"https://api.github.com/repos/oozywaters/test-guru/languages","stargazers_url":"https://api.github.com/repos/oozywaters/test-guru/stargazers","contributors_url":"https://api.github.com/repos/oozywaters/test-guru/contributors","subscribers_url":"https://api.github.com/repos/oozywaters/test-guru/subscribers","subscription_url":"https://api.github.com/repos/oozywaters/test-guru/subscription","commits_url":"https://api.github.com/repos/oozywaters/test-guru/commits{/sha}","git_commits_url":"https://api.github.com/repos/oozywaters/test-guru/git/commits{/sha}","comments_url":"https://api.github.com/repos/oozywaters/test-guru/comments{/number}","issue_comment_url":"https://api.github.com/repos/oozywaters/test-guru/issues/comments{/number}","contents_url":"https://api.github.com/repos/oozywaters/test-guru/contents/{+path}","compare_url":"https://api.github.com/repos/oozywaters/test-guru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oozywaters/test-guru/merges","archive_url":"https://api.github.com/repos/oozywaters/test-guru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oozywaters/test-guru/downloads","issues_url":"https://api.github.com/repos/oozywaters/test-guru/issues{/number}","pulls_url":"https://api.github.com/repos/oozywaters/test-guru/pulls{/number}","milestones_url":"https://api.github.com/repos/oozywaters/test-guru/milestones{/number}","notifications_url":"https://api.github.com/repos/oozywaters/test-guru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oozywaters/test-guru/labels{/name}","releases_url":"https://api.github.com/repos/oozywaters/test-guru/releases{/id}","deployments_url":"https://api.github.com/repos/oozywaters/test-guru/deployments","created_at":"2018-02-22T09:18:11Z","updated_at":"2018-03-16T12:30:34Z","pushed_at":"2018-03-18T09:49:37Z","git_url":"git://github.com/oozywaters/test-guru.git","ssh_url":"git@github.com:oozywaters/test-guru.git","clone_url":"https://github.com/oozywaters/test-guru.git","svn_url":"https://github.com/oozywaters/test-guru","homepage":null,"size":57,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"oozywaters:master","ref":"master","sha":"420c810b2fd87b3eb32230c87d42d31c5f800291","user":{"login":"oozywaters","id":6844772,"avatar_url":"https://avatars0.githubusercontent.com/u/6844772?v=4","gravatar_id":"","url":"https://api.github.com/users/oozywaters","html_url":"https://github.com/oozywaters","followers_url":"https://api.github.com/users/oozywaters/followers","following_url":"https://api.github.com/users/oozywaters/following{/other_user}","gists_url":"https://api.github.com/users/oozywaters/gists{/gist_id}","starred_url":"https://api.github.com/users/oozywaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oozywaters/subscriptions","organizations_url":"https://api.github.com/users/oozywaters/orgs","repos_url":"https://api.github.com/users/oozywaters/repos","events_url":"https://api.github.com/users/oozywaters/events{/privacy}","received_events_url":"https://api.github.com/users/oozywaters/received_events","type":"User","site_admin":false},"repo":{"id":122455867,"name":"test-guru","full_name":"oozywaters/test-guru","owner":{"login":"oozywaters","id":6844772,"avatar_url":"https://avatars0.githubusercontent.com/u/6844772?v=4","gravatar_id":"","url":"https://api.github.com/users/oozywaters","html_url":"https://github.com/oozywaters","followers_url":"https://api.github.com/users/oozywaters/followers","following_url":"https://api.github.com/users/oozywaters/following{/other_user}","gists_url":"https://api.github.com/users/oozywaters/gists{/gist_id}","starred_url":"https://api.github.com/users/oozywaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oozywaters/subscriptions","organizations_url":"https://api.github.com/users/oozywaters/orgs","repos_url":"https://api.github.com/users/oozywaters/repos","events_url":"https://api.github.com/users/oozywaters/events{/privacy}","received_events_url":"https://api.github.com/users/oozywaters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oozywaters/test-guru","description":null,"fork":false,"url":"https://api.github.com/repos/oozywaters/test-guru","forks_url":"https://api.github.com/repos/oozywaters/test-guru/forks","keys_url":"https://api.github.com/repos/oozywaters/test-guru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oozywaters/test-guru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oozywaters/test-guru/teams","hooks_url":"https://api.github.com/repos/oozywaters/test-guru/hooks","issue_events_url":"https://api.github.com/repos/oozywaters/test-guru/issues/events{/number}","events_url":"https://api.github.com/repos/oozywaters/test-guru/events","assignees_url":"https://api.github.com/repos/oozywaters/test-guru/assignees{/user}","branches_url":"https://api.github.com/repos/oozywaters/test-guru/branches{/branch}","tags_url":"https://api.github.com/repos/oozywaters/test-guru/tags","blobs_url":"https://api.github.com/repos/oozywaters/test-guru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oozywaters/test-guru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oozywaters/test-guru/git/refs{/sha}","trees_url":"https://api.github.com/repos/oozywaters/test-guru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oozywaters/test-guru/statuses/{sha}","languages_url":"https://api.github.com/repos/oozywaters/test-guru/languages","stargazers_url":"https://api.github.com/repos/oozywaters/test-guru/stargazers","contributors_url":"https://api.github.com/repos/oozywaters/test-guru/contributors","subscribers_url":"https://api.github.com/repos/oozywaters/test-guru/subscribers","subscription_url":"https://api.github.com/repos/oozywaters/test-guru/subscription","commits_url":"https://api.github.com/repos/oozywaters/test-guru/commits{/sha}","git_commits_url":"https://api.github.com/repos/oozywaters/test-guru/git/commits{/sha}","comments_url":"https://api.github.com/repos/oozywaters/test-guru/comments{/number}","issue_comment_url":"https://api.github.com/repos/oozywaters/test-guru/issues/comments{/number}","contents_url":"https://api.github.com/repos/oozywaters/test-guru/contents/{+path}","compare_url":"https://api.github.com/repos/oozywaters/test-guru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oozywaters/test-guru/merges","archive_url":"https://api.github.com/repos/oozywaters/test-guru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oozywaters/test-guru/downloads","issues_url":"https://api.github.com/repos/oozywaters/test-guru/issues{/number}","pulls_url":"https://api.github.com/repos/oozywaters/test-guru/pulls{/number}","milestones_url":"https://api.github.com/repos/oozywaters/test-guru/milestones{/number}","notifications_url":"https://api.github.com/repos/oozywaters/test-guru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oozywaters/test-guru/labels{/name}","releases_url":"https://api.github.com/repos/oozywaters/test-guru/releases{/id}","deployments_url":"https://api.github.com/repos/oozywaters/test-guru/deployments","created_at":"2018-02-22T09:18:11Z","updated_at":"2018-03-16T12:30:34Z","pushed_at":"2018-03-18T09:49:37Z","git_url":"git://github.com/oozywaters/test-guru.git","ssh_url":"git@github.com:oozywaters/test-guru.git","clone_url":"https://github.com/oozywaters/test-guru.git","svn_url":"https://github.com/oozywaters/test-guru","homepage":null,"size":57,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/6"},"html":{"href":"https://github.com/oozywaters/test-guru/pull/6"},"issue":{"href":"https://api.github.com/repos/oozywaters/test-guru/issues/6"},"comments":{"href":"https://api.github.com/repos/oozywaters/test-guru/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oozywaters/test-guru/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/oozywaters/test-guru/statuses/3e91eae40a87c9cb6903b2266cfc37e3dc43c52c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"iBublik"}}