{"action":"created","comment":{"url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/comments/36537265","id":36537265,"diff_hunk":"@@ -5,6 +5,18 @@ class Card < ActiveRecord::Base\n   validates :original_text, :translated_text, :review_date, presence: true\n   validate :texts_are_not_equal\n \n+  scope :pending, -> { where(\"review_date < ?\", Time.now).offset(Card.count).first }","path":"app/models/card.rb","position":4,"original_position":4,"commit_id":"ff87ca89d9e4598db3c0d626033b8bc80eb6327f","original_commit_id":"ff87ca89d9e4598db3c0d626033b8bc80eb6327f","user":{"login":"mkdev-mentor-1","id":11962702,"avatar_url":"https://avatars.githubusercontent.com/u/11962702?v=3","gravatar_id":"","url":"https://api.github.com/users/mkdev-mentor-1","html_url":"https://github.com/mkdev-mentor-1","followers_url":"https://api.github.com/users/mkdev-mentor-1/followers","following_url":"https://api.github.com/users/mkdev-mentor-1/following{/other_user}","gists_url":"https://api.github.com/users/mkdev-mentor-1/gists{/gist_id}","starred_url":"https://api.github.com/users/mkdev-mentor-1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkdev-mentor-1/subscriptions","organizations_url":"https://api.github.com/users/mkdev-mentor-1/orgs","repos_url":"https://api.github.com/users/mkdev-mentor-1/repos","events_url":"https://api.github.com/users/mkdev-mentor-1/events{/privacy}","received_events_url":"https://api.github.com/users/mkdev-mentor-1/received_events","type":"User","site_admin":false},"body":"1. first не должно быть в скоупе. А если 2 карточки нужно? А если три?\r\n2. Card.count не подойдёт, потому что число карточек для ревью != числу карточек","created_at":"2015-08-07T16:48:30Z","updated_at":"2015-08-07T16:48:30Z","html_url":"https://github.com/postgred/mkdev_easy/pull/5#discussion_r36537265","pull_request_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/postgred/mkdev_easy/pulls/comments/36537265"},"html":{"href":"https://github.com/postgred/mkdev_easy/pull/5#discussion_r36537265"},"pull_request":{"href":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5","id":41838669,"html_url":"https://github.com/postgred/mkdev_easy/pull/5","diff_url":"https://github.com/postgred/mkdev_easy/pull/5.diff","patch_url":"https://github.com/postgred/mkdev_easy/pull/5.patch","issue_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/5","number":5,"state":"open","locked":false,"title":"Task5","user":{"login":"postgred","id":4015182,"avatar_url":"https://avatars.githubusercontent.com/u/4015182?v=3","gravatar_id":"","url":"https://api.github.com/users/postgred","html_url":"https://github.com/postgred","followers_url":"https://api.github.com/users/postgred/followers","following_url":"https://api.github.com/users/postgred/following{/other_user}","gists_url":"https://api.github.com/users/postgred/gists{/gist_id}","starred_url":"https://api.github.com/users/postgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postgred/subscriptions","organizations_url":"https://api.github.com/users/postgred/orgs","repos_url":"https://api.github.com/users/postgred/repos","events_url":"https://api.github.com/users/postgred/events{/privacy}","received_events_url":"https://api.github.com/users/postgred/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-06T21:45:06Z","updated_at":"2015-08-07T16:48:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f73c43eba5c49a8a41a32339cb587d8fba8891ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5/commits","review_comments_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5/comments","review_comment_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/5/comments","statuses_url":"https://api.github.com/repos/postgred/mkdev_easy/statuses/ff87ca89d9e4598db3c0d626033b8bc80eb6327f","head":{"label":"postgred:task5","ref":"task5","sha":"ff87ca89d9e4598db3c0d626033b8bc80eb6327f","user":{"login":"postgred","id":4015182,"avatar_url":"https://avatars.githubusercontent.com/u/4015182?v=3","gravatar_id":"","url":"https://api.github.com/users/postgred","html_url":"https://github.com/postgred","followers_url":"https://api.github.com/users/postgred/followers","following_url":"https://api.github.com/users/postgred/following{/other_user}","gists_url":"https://api.github.com/users/postgred/gists{/gist_id}","starred_url":"https://api.github.com/users/postgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postgred/subscriptions","organizations_url":"https://api.github.com/users/postgred/orgs","repos_url":"https://api.github.com/users/postgred/repos","events_url":"https://api.github.com/users/postgred/events{/privacy}","received_events_url":"https://api.github.com/users/postgred/received_events","type":"User","site_admin":false},"repo":{"id":40075820,"name":"mkdev_easy","full_name":"postgred/mkdev_easy","owner":{"login":"postgred","id":4015182,"avatar_url":"https://avatars.githubusercontent.com/u/4015182?v=3","gravatar_id":"","url":"https://api.github.com/users/postgred","html_url":"https://github.com/postgred","followers_url":"https://api.github.com/users/postgred/followers","following_url":"https://api.github.com/users/postgred/following{/other_user}","gists_url":"https://api.github.com/users/postgred/gists{/gist_id}","starred_url":"https://api.github.com/users/postgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postgred/subscriptions","organizations_url":"https://api.github.com/users/postgred/orgs","repos_url":"https://api.github.com/users/postgred/repos","events_url":"https://api.github.com/users/postgred/events{/privacy}","received_events_url":"https://api.github.com/users/postgred/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/postgred/mkdev_easy","description":"","fork":false,"url":"https://api.github.com/repos/postgred/mkdev_easy","forks_url":"https://api.github.com/repos/postgred/mkdev_easy/forks","keys_url":"https://api.github.com/repos/postgred/mkdev_easy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postgred/mkdev_easy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postgred/mkdev_easy/teams","hooks_url":"https://api.github.com/repos/postgred/mkdev_easy/hooks","issue_events_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/events{/number}","events_url":"https://api.github.com/repos/postgred/mkdev_easy/events","assignees_url":"https://api.github.com/repos/postgred/mkdev_easy/assignees{/user}","branches_url":"https://api.github.com/repos/postgred/mkdev_easy/branches{/branch}","tags_url":"https://api.github.com/repos/postgred/mkdev_easy/tags","blobs_url":"https://api.github.com/repos/postgred/mkdev_easy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postgred/mkdev_easy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postgred/mkdev_easy/git/refs{/sha}","trees_url":"https://api.github.com/repos/postgred/mkdev_easy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postgred/mkdev_easy/statuses/{sha}","languages_url":"https://api.github.com/repos/postgred/mkdev_easy/languages","stargazers_url":"https://api.github.com/repos/postgred/mkdev_easy/stargazers","contributors_url":"https://api.github.com/repos/postgred/mkdev_easy/contributors","subscribers_url":"https://api.github.com/repos/postgred/mkdev_easy/subscribers","subscription_url":"https://api.github.com/repos/postgred/mkdev_easy/subscription","commits_url":"https://api.github.com/repos/postgred/mkdev_easy/commits{/sha}","git_commits_url":"https://api.github.com/repos/postgred/mkdev_easy/git/commits{/sha}","comments_url":"https://api.github.com/repos/postgred/mkdev_easy/comments{/number}","issue_comment_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/comments{/number}","contents_url":"https://api.github.com/repos/postgred/mkdev_easy/contents/{+path}","compare_url":"https://api.github.com/repos/postgred/mkdev_easy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postgred/mkdev_easy/merges","archive_url":"https://api.github.com/repos/postgred/mkdev_easy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postgred/mkdev_easy/downloads","issues_url":"https://api.github.com/repos/postgred/mkdev_easy/issues{/number}","pulls_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls{/number}","milestones_url":"https://api.github.com/repos/postgred/mkdev_easy/milestones{/number}","notifications_url":"https://api.github.com/repos/postgred/mkdev_easy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postgred/mkdev_easy/labels{/name}","releases_url":"https://api.github.com/repos/postgred/mkdev_easy/releases{/id}","created_at":"2015-08-02T10:15:31Z","updated_at":"2015-08-02T10:16:43Z","pushed_at":"2015-08-07T15:54:56Z","git_url":"git://github.com/postgred/mkdev_easy.git","ssh_url":"git@github.com:postgred/mkdev_easy.git","clone_url":"https://github.com/postgred/mkdev_easy.git","svn_url":"https://github.com/postgred/mkdev_easy","homepage":null,"size":0,"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":"postgred:master","ref":"master","sha":"a4d99029c074066952cf941bbefe22a4d51ca5df","user":{"login":"postgred","id":4015182,"avatar_url":"https://avatars.githubusercontent.com/u/4015182?v=3","gravatar_id":"","url":"https://api.github.com/users/postgred","html_url":"https://github.com/postgred","followers_url":"https://api.github.com/users/postgred/followers","following_url":"https://api.github.com/users/postgred/following{/other_user}","gists_url":"https://api.github.com/users/postgred/gists{/gist_id}","starred_url":"https://api.github.com/users/postgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postgred/subscriptions","organizations_url":"https://api.github.com/users/postgred/orgs","repos_url":"https://api.github.com/users/postgred/repos","events_url":"https://api.github.com/users/postgred/events{/privacy}","received_events_url":"https://api.github.com/users/postgred/received_events","type":"User","site_admin":false},"repo":{"id":40075820,"name":"mkdev_easy","full_name":"postgred/mkdev_easy","owner":{"login":"postgred","id":4015182,"avatar_url":"https://avatars.githubusercontent.com/u/4015182?v=3","gravatar_id":"","url":"https://api.github.com/users/postgred","html_url":"https://github.com/postgred","followers_url":"https://api.github.com/users/postgred/followers","following_url":"https://api.github.com/users/postgred/following{/other_user}","gists_url":"https://api.github.com/users/postgred/gists{/gist_id}","starred_url":"https://api.github.com/users/postgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postgred/subscriptions","organizations_url":"https://api.github.com/users/postgred/orgs","repos_url":"https://api.github.com/users/postgred/repos","events_url":"https://api.github.com/users/postgred/events{/privacy}","received_events_url":"https://api.github.com/users/postgred/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/postgred/mkdev_easy","description":"","fork":false,"url":"https://api.github.com/repos/postgred/mkdev_easy","forks_url":"https://api.github.com/repos/postgred/mkdev_easy/forks","keys_url":"https://api.github.com/repos/postgred/mkdev_easy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postgred/mkdev_easy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postgred/mkdev_easy/teams","hooks_url":"https://api.github.com/repos/postgred/mkdev_easy/hooks","issue_events_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/events{/number}","events_url":"https://api.github.com/repos/postgred/mkdev_easy/events","assignees_url":"https://api.github.com/repos/postgred/mkdev_easy/assignees{/user}","branches_url":"https://api.github.com/repos/postgred/mkdev_easy/branches{/branch}","tags_url":"https://api.github.com/repos/postgred/mkdev_easy/tags","blobs_url":"https://api.github.com/repos/postgred/mkdev_easy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postgred/mkdev_easy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postgred/mkdev_easy/git/refs{/sha}","trees_url":"https://api.github.com/repos/postgred/mkdev_easy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postgred/mkdev_easy/statuses/{sha}","languages_url":"https://api.github.com/repos/postgred/mkdev_easy/languages","stargazers_url":"https://api.github.com/repos/postgred/mkdev_easy/stargazers","contributors_url":"https://api.github.com/repos/postgred/mkdev_easy/contributors","subscribers_url":"https://api.github.com/repos/postgred/mkdev_easy/subscribers","subscription_url":"https://api.github.com/repos/postgred/mkdev_easy/subscription","commits_url":"https://api.github.com/repos/postgred/mkdev_easy/commits{/sha}","git_commits_url":"https://api.github.com/repos/postgred/mkdev_easy/git/commits{/sha}","comments_url":"https://api.github.com/repos/postgred/mkdev_easy/comments{/number}","issue_comment_url":"https://api.github.com/repos/postgred/mkdev_easy/issues/comments{/number}","contents_url":"https://api.github.com/repos/postgred/mkdev_easy/contents/{+path}","compare_url":"https://api.github.com/repos/postgred/mkdev_easy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postgred/mkdev_easy/merges","archive_url":"https://api.github.com/repos/postgred/mkdev_easy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postgred/mkdev_easy/downloads","issues_url":"https://api.github.com/repos/postgred/mkdev_easy/issues{/number}","pulls_url":"https://api.github.com/repos/postgred/mkdev_easy/pulls{/number}","milestones_url":"https://api.github.com/repos/postgred/mkdev_easy/milestones{/number}","notifications_url":"https://api.github.com/repos/postgred/mkdev_easy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postgred/mkdev_easy/labels{/name}","releases_url":"https://api.github.com/repos/postgred/mkdev_easy/releases{/id}","created_at":"2015-08-02T10:15:31Z","updated_at":"2015-08-02T10:16:43Z","pushed_at":"2015-08-07T15:54:56Z","git_url":"git://github.com/postgred/mkdev_easy.git","ssh_url":"git@github.com:postgred/mkdev_easy.git","clone_url":"https://github.com/postgred/mkdev_easy.git","svn_url":"https://github.com/postgred/mkdev_easy","homepage":null,"size":0,"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/postgred/mkdev_easy/pulls/5"},"html":{"href":"https://github.com/postgred/mkdev_easy/pull/5"},"issue":{"href":"https://api.github.com/repos/postgred/mkdev_easy/issues/5"},"comments":{"href":"https://api.github.com/repos/postgred/mkdev_easy/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/postgred/mkdev_easy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/postgred/mkdev_easy/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/postgred/mkdev_easy/statuses/ff87ca89d9e4598db3c0d626033b8bc80eb6327f"}}}}