{"action":"created","comment":{"url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/comments/29068144","id":29068144,"diff_hunk":"@@ -2,6 +2,7 @@ class Card < ActiveRecord::Base\n   validates :original_text, :translated_text, :review_date, presence: true\n   validate :eguality_of_texts\n   before_save :add_days_to_review_date\n+  scope :check_review_date, -> { where(\"review_date <= :current_time\", {current_time: Time.now.to_date}) }","path":"app/models/card.rb","position":4,"original_position":4,"commit_id":"c1d26ea1e422dbefe81f6b7e5893fd9d20d10206","original_commit_id":"c1d26ea1e422dbefe81f6b7e5893fd9d20d10206","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":"усложнил: `where(\"review_date <= ?\", Date.today)`","created_at":"2015-04-24T17:30:27Z","updated_at":"2015-04-24T17:30:27Z","html_url":"https://github.com/andrei-sheina/flashcards/pull/6#discussion_r29068144","pull_request_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/comments/29068144"},"html":{"href":"https://github.com/andrei-sheina/flashcards/pull/6#discussion_r29068144"},"pull_request":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6","id":34065372,"html_url":"https://github.com/andrei-sheina/flashcards/pull/6","diff_url":"https://github.com/andrei-sheina/flashcards/pull/6.diff","patch_url":"https://github.com/andrei-sheina/flashcards/pull/6.patch","issue_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/6","number":6,"state":"open","locked":false,"title":"Task5","user":{"login":"andrei-sheina","id":11193254,"avatar_url":"https://avatars.githubusercontent.com/u/11193254?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-sheina","html_url":"https://github.com/andrei-sheina","followers_url":"https://api.github.com/users/andrei-sheina/followers","following_url":"https://api.github.com/users/andrei-sheina/following{/other_user}","gists_url":"https://api.github.com/users/andrei-sheina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-sheina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-sheina/subscriptions","organizations_url":"https://api.github.com/users/andrei-sheina/orgs","repos_url":"https://api.github.com/users/andrei-sheina/repos","events_url":"https://api.github.com/users/andrei-sheina/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-sheina/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-24T16:42:57Z","updated_at":"2015-04-24T17:30:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2a4dc127d1c6654de4e1808ff9786d0b65d7683","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6/commits","review_comments_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6/comments","review_comment_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/6/comments","statuses_url":"https://api.github.com/repos/andrei-sheina/flashcards/statuses/c1d26ea1e422dbefe81f6b7e5893fd9d20d10206","head":{"label":"andrei-sheina:task5","ref":"task5","sha":"c1d26ea1e422dbefe81f6b7e5893fd9d20d10206","user":{"login":"andrei-sheina","id":11193254,"avatar_url":"https://avatars.githubusercontent.com/u/11193254?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-sheina","html_url":"https://github.com/andrei-sheina","followers_url":"https://api.github.com/users/andrei-sheina/followers","following_url":"https://api.github.com/users/andrei-sheina/following{/other_user}","gists_url":"https://api.github.com/users/andrei-sheina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-sheina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-sheina/subscriptions","organizations_url":"https://api.github.com/users/andrei-sheina/orgs","repos_url":"https://api.github.com/users/andrei-sheina/repos","events_url":"https://api.github.com/users/andrei-sheina/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-sheina/received_events","type":"User","site_admin":false},"repo":{"id":34069529,"name":"flashcards","full_name":"andrei-sheina/flashcards","owner":{"login":"andrei-sheina","id":11193254,"avatar_url":"https://avatars.githubusercontent.com/u/11193254?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-sheina","html_url":"https://github.com/andrei-sheina","followers_url":"https://api.github.com/users/andrei-sheina/followers","following_url":"https://api.github.com/users/andrei-sheina/following{/other_user}","gists_url":"https://api.github.com/users/andrei-sheina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-sheina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-sheina/subscriptions","organizations_url":"https://api.github.com/users/andrei-sheina/orgs","repos_url":"https://api.github.com/users/andrei-sheina/repos","events_url":"https://api.github.com/users/andrei-sheina/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-sheina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrei-sheina/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/andrei-sheina/flashcards","forks_url":"https://api.github.com/repos/andrei-sheina/flashcards/forks","keys_url":"https://api.github.com/repos/andrei-sheina/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrei-sheina/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrei-sheina/flashcards/teams","hooks_url":"https://api.github.com/repos/andrei-sheina/flashcards/hooks","issue_events_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/andrei-sheina/flashcards/events","assignees_url":"https://api.github.com/repos/andrei-sheina/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/andrei-sheina/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/andrei-sheina/flashcards/tags","blobs_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrei-sheina/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/andrei-sheina/flashcards/languages","stargazers_url":"https://api.github.com/repos/andrei-sheina/flashcards/stargazers","contributors_url":"https://api.github.com/repos/andrei-sheina/flashcards/contributors","subscribers_url":"https://api.github.com/repos/andrei-sheina/flashcards/subscribers","subscription_url":"https://api.github.com/repos/andrei-sheina/flashcards/subscription","commits_url":"https://api.github.com/repos/andrei-sheina/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrei-sheina/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrei-sheina/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/andrei-sheina/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrei-sheina/flashcards/merges","archive_url":"https://api.github.com/repos/andrei-sheina/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrei-sheina/flashcards/downloads","issues_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/andrei-sheina/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/andrei-sheina/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrei-sheina/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/andrei-sheina/flashcards/releases{/id}","created_at":"2015-04-16T17:17:16Z","updated_at":"2015-04-19T22:22:47Z","pushed_at":"2015-04-24T16:55:36Z","git_url":"git://github.com/andrei-sheina/flashcards.git","ssh_url":"git@github.com:andrei-sheina/flashcards.git","clone_url":"https://github.com/andrei-sheina/flashcards.git","svn_url":"https://github.com/andrei-sheina/flashcards","homepage":null,"size":364,"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":"andrei-sheina:master","ref":"master","sha":"44e71da51425889f24695f840c4fd4cf62d1e2ef","user":{"login":"andrei-sheina","id":11193254,"avatar_url":"https://avatars.githubusercontent.com/u/11193254?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-sheina","html_url":"https://github.com/andrei-sheina","followers_url":"https://api.github.com/users/andrei-sheina/followers","following_url":"https://api.github.com/users/andrei-sheina/following{/other_user}","gists_url":"https://api.github.com/users/andrei-sheina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-sheina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-sheina/subscriptions","organizations_url":"https://api.github.com/users/andrei-sheina/orgs","repos_url":"https://api.github.com/users/andrei-sheina/repos","events_url":"https://api.github.com/users/andrei-sheina/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-sheina/received_events","type":"User","site_admin":false},"repo":{"id":34069529,"name":"flashcards","full_name":"andrei-sheina/flashcards","owner":{"login":"andrei-sheina","id":11193254,"avatar_url":"https://avatars.githubusercontent.com/u/11193254?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-sheina","html_url":"https://github.com/andrei-sheina","followers_url":"https://api.github.com/users/andrei-sheina/followers","following_url":"https://api.github.com/users/andrei-sheina/following{/other_user}","gists_url":"https://api.github.com/users/andrei-sheina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-sheina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-sheina/subscriptions","organizations_url":"https://api.github.com/users/andrei-sheina/orgs","repos_url":"https://api.github.com/users/andrei-sheina/repos","events_url":"https://api.github.com/users/andrei-sheina/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-sheina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrei-sheina/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/andrei-sheina/flashcards","forks_url":"https://api.github.com/repos/andrei-sheina/flashcards/forks","keys_url":"https://api.github.com/repos/andrei-sheina/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrei-sheina/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrei-sheina/flashcards/teams","hooks_url":"https://api.github.com/repos/andrei-sheina/flashcards/hooks","issue_events_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/andrei-sheina/flashcards/events","assignees_url":"https://api.github.com/repos/andrei-sheina/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/andrei-sheina/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/andrei-sheina/flashcards/tags","blobs_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrei-sheina/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/andrei-sheina/flashcards/languages","stargazers_url":"https://api.github.com/repos/andrei-sheina/flashcards/stargazers","contributors_url":"https://api.github.com/repos/andrei-sheina/flashcards/contributors","subscribers_url":"https://api.github.com/repos/andrei-sheina/flashcards/subscribers","subscription_url":"https://api.github.com/repos/andrei-sheina/flashcards/subscription","commits_url":"https://api.github.com/repos/andrei-sheina/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrei-sheina/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrei-sheina/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrei-sheina/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/andrei-sheina/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrei-sheina/flashcards/merges","archive_url":"https://api.github.com/repos/andrei-sheina/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrei-sheina/flashcards/downloads","issues_url":"https://api.github.com/repos/andrei-sheina/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/andrei-sheina/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/andrei-sheina/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/andrei-sheina/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrei-sheina/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/andrei-sheina/flashcards/releases{/id}","created_at":"2015-04-16T17:17:16Z","updated_at":"2015-04-19T22:22:47Z","pushed_at":"2015-04-24T16:55:36Z","git_url":"git://github.com/andrei-sheina/flashcards.git","ssh_url":"git@github.com:andrei-sheina/flashcards.git","clone_url":"https://github.com/andrei-sheina/flashcards.git","svn_url":"https://github.com/andrei-sheina/flashcards","homepage":null,"size":364,"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/andrei-sheina/flashcards/pulls/6"},"html":{"href":"https://github.com/andrei-sheina/flashcards/pull/6"},"issue":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/issues/6"},"comments":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/andrei-sheina/flashcards/statuses/c1d26ea1e422dbefe81f6b7e5893fd9d20d10206"}}}}