{"action":"created","comment":{"url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/comments/264055956","pull_request_review_id":212619310,"id":264055956,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NDA1NTk1Ng==","diff_hunk":"@@ -1,40 +1,50 @@\n class QuestionsController < ApplicationController\n-  before_action :search_test\n   rescue_from ActiveRecord::RecordNotFound, with: :rescue_record_not_found\n \n   def index\n     render json: { questions: @test.questions }\n   end\n \n   def show\n-    render json: { question: Question.find(params[:id]) }\n+    @question = Question.find(params[:id])","path":"app/controllers/questions_controller.rb","position":11,"original_position":11,"commit_id":"00295a633c8f9498e26a30adc4426026093f7b72","original_commit_id":"00295a633c8f9498e26a30adc4426026093f7b72","user":{"login":"BubuntuClu","id":13871063,"node_id":"MDQ6VXNlcjEzODcxMDYz","avatar_url":"https://avatars0.githubusercontent.com/u/13871063?v=4","gravatar_id":"","url":"https://api.github.com/users/BubuntuClu","html_url":"https://github.com/BubuntuClu","followers_url":"https://api.github.com/users/BubuntuClu/followers","following_url":"https://api.github.com/users/BubuntuClu/following{/other_user}","gists_url":"https://api.github.com/users/BubuntuClu/gists{/gist_id}","starred_url":"https://api.github.com/users/BubuntuClu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BubuntuClu/subscriptions","organizations_url":"https://api.github.com/users/BubuntuClu/orgs","repos_url":"https://api.github.com/users/BubuntuClu/repos","events_url":"https://api.github.com/users/BubuntuClu/events{/privacy}","received_events_url":"https://api.github.com/users/BubuntuClu/received_events","type":"User","site_admin":false},"body":"`Question.find(params[:id])` у тебя этот метод повторяется много раз в коде. используй `before_action`","created_at":"2019-03-10T20:06:50Z","updated_at":"2019-03-10T20:10:19Z","html_url":"https://github.com/Gartenz/tn-test-guru/pull/8#discussion_r264055956","pull_request_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/comments/264055956"},"html":{"href":"https://github.com/Gartenz/tn-test-guru/pull/8#discussion_r264055956"},"pull_request":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8","id":259769182,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU5NzY5MTgy","html_url":"https://github.com/Gartenz/tn-test-guru/pull/8","diff_url":"https://github.com/Gartenz/tn-test-guru/pull/8.diff","patch_url":"https://github.com/Gartenz/tn-test-guru/pull/8.patch","issue_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/8","number":8,"state":"open","locked":false,"title":"Rails Views","user":{"login":"Gartenz","id":5246683,"node_id":"MDQ6VXNlcjUyNDY2ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5246683?v=4","gravatar_id":"","url":"https://api.github.com/users/Gartenz","html_url":"https://github.com/Gartenz","followers_url":"https://api.github.com/users/Gartenz/followers","following_url":"https://api.github.com/users/Gartenz/following{/other_user}","gists_url":"https://api.github.com/users/Gartenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gartenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gartenz/subscriptions","organizations_url":"https://api.github.com/users/Gartenz/orgs","repos_url":"https://api.github.com/users/Gartenz/repos","events_url":"https://api.github.com/users/Gartenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gartenz/received_events","type":"User","site_admin":false},"body":"1. Реализуйте все стандартные действия вместе с представлениями (видами) для ресурса вопросов:\r\n   - Список вопросов теста должен выводиться на той же странице, что и сам тест\r\n   - Используйте фрагменты представлений там, где это уместно\r\n   - Для того чтобы метод form_with смог сформировать верный URL используйте вызов `form_with model: [@parent, @child]`\r\n   - В представлениях должны быть ссылки для навигации между страницами приложения\r\n2. Добавьте футер в котором будет выводиться текущий год, имя автора, название проекта (в виде ссылки на GitHub-репозиторий проекта), его краткое описание и ссылка с текстом \"Учебный проект в онлайн-школе Thinknetica\", ведущая на адрес [thinknetica.com](url)\r\n3. Напишите хэлперы:\r\n    - Для заголовка формы создания и редактирования вопроса. Это должен быть один метод `question_header` который в форме создания вопроса будет выводить Create New <Test Title> Question, а в форме редактирования Edit <Test Title> Question\r\n    - Для вывода текущего года в футере\r\n    - Для формирования ссылки на GitHub репозиторий: `github_url(author, repo)`\r\n4. Добавьте в представление списка тестов количество вопросов для каждого теста","created_at":"2019-03-10T15:56:28Z","updated_at":"2019-03-10T20:10:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb7a712c2aa5d67ed9e4bf6f5e8a38e3641e91fb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/8/comments","statuses_url":"https://api.github.com/repos/Gartenz/tn-test-guru/statuses/00295a633c8f9498e26a30adc4426026093f7b72","head":{"label":"Gartenz:lesson8","ref":"lesson8","sha":"00295a633c8f9498e26a30adc4426026093f7b72","user":{"login":"Gartenz","id":5246683,"node_id":"MDQ6VXNlcjUyNDY2ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5246683?v=4","gravatar_id":"","url":"https://api.github.com/users/Gartenz","html_url":"https://github.com/Gartenz","followers_url":"https://api.github.com/users/Gartenz/followers","following_url":"https://api.github.com/users/Gartenz/following{/other_user}","gists_url":"https://api.github.com/users/Gartenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gartenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gartenz/subscriptions","organizations_url":"https://api.github.com/users/Gartenz/orgs","repos_url":"https://api.github.com/users/Gartenz/repos","events_url":"https://api.github.com/users/Gartenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gartenz/received_events","type":"User","site_admin":false},"repo":{"id":172919900,"node_id":"MDEwOlJlcG9zaXRvcnkxNzI5MTk5MDA=","name":"tn-test-guru","full_name":"Gartenz/tn-test-guru","private":false,"owner":{"login":"Gartenz","id":5246683,"node_id":"MDQ6VXNlcjUyNDY2ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5246683?v=4","gravatar_id":"","url":"https://api.github.com/users/Gartenz","html_url":"https://github.com/Gartenz","followers_url":"https://api.github.com/users/Gartenz/followers","following_url":"https://api.github.com/users/Gartenz/following{/other_user}","gists_url":"https://api.github.com/users/Gartenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gartenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gartenz/subscriptions","organizations_url":"https://api.github.com/users/Gartenz/orgs","repos_url":"https://api.github.com/users/Gartenz/repos","events_url":"https://api.github.com/users/Gartenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gartenz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Gartenz/tn-test-guru","description":"Проект домашних заданий курса Основы Rails от Thinknetica","fork":false,"url":"https://api.github.com/repos/Gartenz/tn-test-guru","forks_url":"https://api.github.com/repos/Gartenz/tn-test-guru/forks","keys_url":"https://api.github.com/repos/Gartenz/tn-test-guru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gartenz/tn-test-guru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gartenz/tn-test-guru/teams","hooks_url":"https://api.github.com/repos/Gartenz/tn-test-guru/hooks","issue_events_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/events{/number}","events_url":"https://api.github.com/repos/Gartenz/tn-test-guru/events","assignees_url":"https://api.github.com/repos/Gartenz/tn-test-guru/assignees{/user}","branches_url":"https://api.github.com/repos/Gartenz/tn-test-guru/branches{/branch}","tags_url":"https://api.github.com/repos/Gartenz/tn-test-guru/tags","blobs_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gartenz/tn-test-guru/statuses/{sha}","languages_url":"https://api.github.com/repos/Gartenz/tn-test-guru/languages","stargazers_url":"https://api.github.com/repos/Gartenz/tn-test-guru/stargazers","contributors_url":"https://api.github.com/repos/Gartenz/tn-test-guru/contributors","subscribers_url":"https://api.github.com/repos/Gartenz/tn-test-guru/subscribers","subscription_url":"https://api.github.com/repos/Gartenz/tn-test-guru/subscription","commits_url":"https://api.github.com/repos/Gartenz/tn-test-guru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gartenz/tn-test-guru/contents/{+path}","compare_url":"https://api.github.com/repos/Gartenz/tn-test-guru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gartenz/tn-test-guru/merges","archive_url":"https://api.github.com/repos/Gartenz/tn-test-guru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gartenz/tn-test-guru/downloads","issues_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues{/number}","pulls_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls{/number}","milestones_url":"https://api.github.com/repos/Gartenz/tn-test-guru/milestones{/number}","notifications_url":"https://api.github.com/repos/Gartenz/tn-test-guru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gartenz/tn-test-guru/labels{/name}","releases_url":"https://api.github.com/repos/Gartenz/tn-test-guru/releases{/id}","deployments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/deployments","created_at":"2019-02-27T13:23:07Z","updated_at":"2019-03-03T10:10:05Z","pushed_at":"2019-03-10T15:56:28Z","git_url":"git://github.com/Gartenz/tn-test-guru.git","ssh_url":"git@github.com:Gartenz/tn-test-guru.git","clone_url":"https://github.com/Gartenz/tn-test-guru.git","svn_url":"https://github.com/Gartenz/tn-test-guru","homepage":"","size":62,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"Gartenz:dev","ref":"dev","sha":"ab33becfdb20689f683220c8b1024746f4b61f68","user":{"login":"Gartenz","id":5246683,"node_id":"MDQ6VXNlcjUyNDY2ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5246683?v=4","gravatar_id":"","url":"https://api.github.com/users/Gartenz","html_url":"https://github.com/Gartenz","followers_url":"https://api.github.com/users/Gartenz/followers","following_url":"https://api.github.com/users/Gartenz/following{/other_user}","gists_url":"https://api.github.com/users/Gartenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gartenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gartenz/subscriptions","organizations_url":"https://api.github.com/users/Gartenz/orgs","repos_url":"https://api.github.com/users/Gartenz/repos","events_url":"https://api.github.com/users/Gartenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gartenz/received_events","type":"User","site_admin":false},"repo":{"id":172919900,"node_id":"MDEwOlJlcG9zaXRvcnkxNzI5MTk5MDA=","name":"tn-test-guru","full_name":"Gartenz/tn-test-guru","private":false,"owner":{"login":"Gartenz","id":5246683,"node_id":"MDQ6VXNlcjUyNDY2ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5246683?v=4","gravatar_id":"","url":"https://api.github.com/users/Gartenz","html_url":"https://github.com/Gartenz","followers_url":"https://api.github.com/users/Gartenz/followers","following_url":"https://api.github.com/users/Gartenz/following{/other_user}","gists_url":"https://api.github.com/users/Gartenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gartenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gartenz/subscriptions","organizations_url":"https://api.github.com/users/Gartenz/orgs","repos_url":"https://api.github.com/users/Gartenz/repos","events_url":"https://api.github.com/users/Gartenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gartenz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Gartenz/tn-test-guru","description":"Проект домашних заданий курса Основы Rails от Thinknetica","fork":false,"url":"https://api.github.com/repos/Gartenz/tn-test-guru","forks_url":"https://api.github.com/repos/Gartenz/tn-test-guru/forks","keys_url":"https://api.github.com/repos/Gartenz/tn-test-guru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gartenz/tn-test-guru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gartenz/tn-test-guru/teams","hooks_url":"https://api.github.com/repos/Gartenz/tn-test-guru/hooks","issue_events_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/events{/number}","events_url":"https://api.github.com/repos/Gartenz/tn-test-guru/events","assignees_url":"https://api.github.com/repos/Gartenz/tn-test-guru/assignees{/user}","branches_url":"https://api.github.com/repos/Gartenz/tn-test-guru/branches{/branch}","tags_url":"https://api.github.com/repos/Gartenz/tn-test-guru/tags","blobs_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gartenz/tn-test-guru/statuses/{sha}","languages_url":"https://api.github.com/repos/Gartenz/tn-test-guru/languages","stargazers_url":"https://api.github.com/repos/Gartenz/tn-test-guru/stargazers","contributors_url":"https://api.github.com/repos/Gartenz/tn-test-guru/contributors","subscribers_url":"https://api.github.com/repos/Gartenz/tn-test-guru/subscribers","subscription_url":"https://api.github.com/repos/Gartenz/tn-test-guru/subscription","commits_url":"https://api.github.com/repos/Gartenz/tn-test-guru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gartenz/tn-test-guru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gartenz/tn-test-guru/contents/{+path}","compare_url":"https://api.github.com/repos/Gartenz/tn-test-guru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gartenz/tn-test-guru/merges","archive_url":"https://api.github.com/repos/Gartenz/tn-test-guru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gartenz/tn-test-guru/downloads","issues_url":"https://api.github.com/repos/Gartenz/tn-test-guru/issues{/number}","pulls_url":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls{/number}","milestones_url":"https://api.github.com/repos/Gartenz/tn-test-guru/milestones{/number}","notifications_url":"https://api.github.com/repos/Gartenz/tn-test-guru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gartenz/tn-test-guru/labels{/name}","releases_url":"https://api.github.com/repos/Gartenz/tn-test-guru/releases{/id}","deployments_url":"https://api.github.com/repos/Gartenz/tn-test-guru/deployments","created_at":"2019-02-27T13:23:07Z","updated_at":"2019-03-03T10:10:05Z","pushed_at":"2019-03-10T15:56:28Z","git_url":"git://github.com/Gartenz/tn-test-guru.git","ssh_url":"git@github.com:Gartenz/tn-test-guru.git","clone_url":"https://github.com/Gartenz/tn-test-guru.git","svn_url":"https://github.com/Gartenz/tn-test-guru","homepage":"","size":62,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8"},"html":{"href":"https://github.com/Gartenz/tn-test-guru/pull/8"},"issue":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/8"},"comments":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Gartenz/tn-test-guru/statuses/00295a633c8f9498e26a30adc4426026093f7b72"}},"author_association":"OWNER"}}
{"actor":{"display_login":"BubuntuClu"}}