{"action":"created","comment":{"url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/comments/239186983","pull_request_review_id":181909786,"id":239186983,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTE4Njk4Mw==","diff_hunk":"@@ -4,6 +4,13 @@ class Test < ApplicationRecord\n   has_many :questions\n   has_many :tests_users\n   has_many :users, through: :tests_users\n+  scope :by_level, -> (level) { where(level: level) }\n+  scope :simple, -> { by_level(0..1) }\n+  scope :middle, -> { where(level: 2..4) }","path":"app/models/test.rb","position":6,"original_position":6,"commit_id":"f111343cb71810316015aee34dcb2b3fcd1fffbe","original_commit_id":"f111343cb71810316015aee34dcb2b3fcd1fffbe","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":"в остальных скоупах тоже можно было заменить","created_at":"2018-12-05T18:38:11Z","updated_at":"2018-12-05T18:38:59Z","html_url":"https://github.com/Pekhov/TestGuru/pull/5#discussion_r239186983","pull_request_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Pekhov/TestGuru/pulls/comments/239186983"},"html":{"href":"https://github.com/Pekhov/TestGuru/pull/5#discussion_r239186983"},"pull_request":{"href":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5","id":236064315,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MDY0MzE1","html_url":"https://github.com/Pekhov/TestGuru/pull/5","diff_url":"https://github.com/Pekhov/TestGuru/pull/5.diff","patch_url":"https://github.com/Pekhov/TestGuru/pull/5.patch","issue_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/5","number":5,"state":"open","locked":false,"title":"Lesson 6","user":{"login":"Pekhov","id":22471703,"node_id":"MDQ6VXNlcjIyNDcxNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/22471703?v=4","gravatar_id":"","url":"https://api.github.com/users/Pekhov","html_url":"https://github.com/Pekhov","followers_url":"https://api.github.com/users/Pekhov/followers","following_url":"https://api.github.com/users/Pekhov/following{/other_user}","gists_url":"https://api.github.com/users/Pekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Pekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pekhov/subscriptions","organizations_url":"https://api.github.com/users/Pekhov/orgs","repos_url":"https://api.github.com/users/Pekhov/repos","events_url":"https://api.github.com/users/Pekhov/events{/privacy}","received_events_url":"https://api.github.com/users/Pekhov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-05T06:47:51Z","updated_at":"2018-12-05T18:38:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d459faee84cd9cc370b23e752f048ad6bc4bdac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/5/comments","statuses_url":"https://api.github.com/repos/Pekhov/TestGuru/statuses/f111343cb71810316015aee34dcb2b3fcd1fffbe","head":{"label":"Pekhov:Lesson_6","ref":"Lesson_6","sha":"f111343cb71810316015aee34dcb2b3fcd1fffbe","user":{"login":"Pekhov","id":22471703,"node_id":"MDQ6VXNlcjIyNDcxNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/22471703?v=4","gravatar_id":"","url":"https://api.github.com/users/Pekhov","html_url":"https://github.com/Pekhov","followers_url":"https://api.github.com/users/Pekhov/followers","following_url":"https://api.github.com/users/Pekhov/following{/other_user}","gists_url":"https://api.github.com/users/Pekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Pekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pekhov/subscriptions","organizations_url":"https://api.github.com/users/Pekhov/orgs","repos_url":"https://api.github.com/users/Pekhov/repos","events_url":"https://api.github.com/users/Pekhov/events{/privacy}","received_events_url":"https://api.github.com/users/Pekhov/received_events","type":"User","site_admin":false},"repo":{"id":154485914,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0ODU5MTQ=","name":"TestGuru","full_name":"Pekhov/TestGuru","private":false,"owner":{"login":"Pekhov","id":22471703,"node_id":"MDQ6VXNlcjIyNDcxNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/22471703?v=4","gravatar_id":"","url":"https://api.github.com/users/Pekhov","html_url":"https://github.com/Pekhov","followers_url":"https://api.github.com/users/Pekhov/followers","following_url":"https://api.github.com/users/Pekhov/following{/other_user}","gists_url":"https://api.github.com/users/Pekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Pekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pekhov/subscriptions","organizations_url":"https://api.github.com/users/Pekhov/orgs","repos_url":"https://api.github.com/users/Pekhov/repos","events_url":"https://api.github.com/users/Pekhov/events{/privacy}","received_events_url":"https://api.github.com/users/Pekhov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Pekhov/TestGuru","description":null,"fork":false,"url":"https://api.github.com/repos/Pekhov/TestGuru","forks_url":"https://api.github.com/repos/Pekhov/TestGuru/forks","keys_url":"https://api.github.com/repos/Pekhov/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pekhov/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pekhov/TestGuru/teams","hooks_url":"https://api.github.com/repos/Pekhov/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/Pekhov/TestGuru/events","assignees_url":"https://api.github.com/repos/Pekhov/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/Pekhov/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/Pekhov/TestGuru/tags","blobs_url":"https://api.github.com/repos/Pekhov/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pekhov/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pekhov/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pekhov/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pekhov/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/Pekhov/TestGuru/languages","stargazers_url":"https://api.github.com/repos/Pekhov/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/Pekhov/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/Pekhov/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/Pekhov/TestGuru/subscription","commits_url":"https://api.github.com/repos/Pekhov/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pekhov/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pekhov/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pekhov/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/Pekhov/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pekhov/TestGuru/merges","archive_url":"https://api.github.com/repos/Pekhov/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pekhov/TestGuru/downloads","issues_url":"https://api.github.com/repos/Pekhov/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/Pekhov/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/Pekhov/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pekhov/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/Pekhov/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/Pekhov/TestGuru/deployments","created_at":"2018-10-24T10:58:42Z","updated_at":"2018-12-04T13:08:19Z","pushed_at":"2018-12-05T16:20:44Z","git_url":"git://github.com/Pekhov/TestGuru.git","ssh_url":"git@github.com:Pekhov/TestGuru.git","clone_url":"https://github.com/Pekhov/TestGuru.git","svn_url":"https://github.com/Pekhov/TestGuru","homepage":null,"size":54,"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":"Pekhov:master","ref":"master","sha":"122884324baa3badf2c4c7d2a5d797bead97240b","user":{"login":"Pekhov","id":22471703,"node_id":"MDQ6VXNlcjIyNDcxNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/22471703?v=4","gravatar_id":"","url":"https://api.github.com/users/Pekhov","html_url":"https://github.com/Pekhov","followers_url":"https://api.github.com/users/Pekhov/followers","following_url":"https://api.github.com/users/Pekhov/following{/other_user}","gists_url":"https://api.github.com/users/Pekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Pekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pekhov/subscriptions","organizations_url":"https://api.github.com/users/Pekhov/orgs","repos_url":"https://api.github.com/users/Pekhov/repos","events_url":"https://api.github.com/users/Pekhov/events{/privacy}","received_events_url":"https://api.github.com/users/Pekhov/received_events","type":"User","site_admin":false},"repo":{"id":154485914,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0ODU5MTQ=","name":"TestGuru","full_name":"Pekhov/TestGuru","private":false,"owner":{"login":"Pekhov","id":22471703,"node_id":"MDQ6VXNlcjIyNDcxNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/22471703?v=4","gravatar_id":"","url":"https://api.github.com/users/Pekhov","html_url":"https://github.com/Pekhov","followers_url":"https://api.github.com/users/Pekhov/followers","following_url":"https://api.github.com/users/Pekhov/following{/other_user}","gists_url":"https://api.github.com/users/Pekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/Pekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pekhov/subscriptions","organizations_url":"https://api.github.com/users/Pekhov/orgs","repos_url":"https://api.github.com/users/Pekhov/repos","events_url":"https://api.github.com/users/Pekhov/events{/privacy}","received_events_url":"https://api.github.com/users/Pekhov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Pekhov/TestGuru","description":null,"fork":false,"url":"https://api.github.com/repos/Pekhov/TestGuru","forks_url":"https://api.github.com/repos/Pekhov/TestGuru/forks","keys_url":"https://api.github.com/repos/Pekhov/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pekhov/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pekhov/TestGuru/teams","hooks_url":"https://api.github.com/repos/Pekhov/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/Pekhov/TestGuru/events","assignees_url":"https://api.github.com/repos/Pekhov/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/Pekhov/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/Pekhov/TestGuru/tags","blobs_url":"https://api.github.com/repos/Pekhov/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pekhov/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pekhov/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pekhov/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pekhov/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/Pekhov/TestGuru/languages","stargazers_url":"https://api.github.com/repos/Pekhov/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/Pekhov/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/Pekhov/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/Pekhov/TestGuru/subscription","commits_url":"https://api.github.com/repos/Pekhov/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pekhov/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pekhov/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pekhov/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pekhov/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/Pekhov/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pekhov/TestGuru/merges","archive_url":"https://api.github.com/repos/Pekhov/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pekhov/TestGuru/downloads","issues_url":"https://api.github.com/repos/Pekhov/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/Pekhov/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/Pekhov/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/Pekhov/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pekhov/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/Pekhov/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/Pekhov/TestGuru/deployments","created_at":"2018-10-24T10:58:42Z","updated_at":"2018-12-04T13:08:19Z","pushed_at":"2018-12-05T16:20:44Z","git_url":"git://github.com/Pekhov/TestGuru.git","ssh_url":"git@github.com:Pekhov/TestGuru.git","clone_url":"https://github.com/Pekhov/TestGuru.git","svn_url":"https://github.com/Pekhov/TestGuru","homepage":null,"size":54,"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/Pekhov/TestGuru/pulls/5"},"html":{"href":"https://github.com/Pekhov/TestGuru/pull/5"},"issue":{"href":"https://api.github.com/repos/Pekhov/TestGuru/issues/5"},"comments":{"href":"https://api.github.com/repos/Pekhov/TestGuru/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Pekhov/TestGuru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pekhov/TestGuru/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Pekhov/TestGuru/statuses/f111343cb71810316015aee34dcb2b3fcd1fffbe"}},"author_association":"OWNER"}}
{"actor":{"display_login":"BubuntuClu"}}