{"action":"created","comment":{"url":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments/25312586","id":25312586,"diff_hunk":"@@ -1,9 +1,22 @@\n+# encoding: UTF-8\n class Card < ActiveRecord::Base\n   validates :original_text, :translated_text, :review_date,\n             presence: true\n   validate :words_equal?\n   before_validation :set_review_date, if: :new_record?\n \n+  scope :get_random_card, -> { where(\"review_date < ?\", Date.today).order(\"RANDOM()\").first }","path":"app/models/card.rb","position":8,"original_position":8,"commit_id":"f5bccebe2958958032fd06188610ffdfdedd2fe3","original_commit_id":"f5bccebe2958958032fd06188610ffdfdedd2fe3","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [93/80]","created_at":"2015-02-25T01:59:47Z","updated_at":"2015-02-25T01:59:47Z","html_url":"https://github.com/sichacvah/flashcards/pull/5#discussion_r25312586","pull_request_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments/25312586"},"html":{"href":"https://github.com/sichacvah/flashcards/pull/5#discussion_r25312586"},"pull_request":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/sichacvah/flashcards/pulls/5","id":29955200,"html_url":"https://github.com/sichacvah/flashcards/pull/5","diff_url":"https://github.com/sichacvah/flashcards/pull/5.diff","patch_url":"https://github.com/sichacvah/flashcards/pull/5.patch","issue_url":"https://api.github.com/repos/sichacvah/flashcards/issues/5","number":5,"state":"open","locked":false,"title":"fifth-task","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-25T01:59:42Z","updated_at":"2015-02-25T01:59:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e316d6884d4c927fe3282e35b1a46b4d75079573","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/5/commits","review_comments_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/5/comments","review_comment_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/issues/5/comments","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/f5bccebe2958958032fd06188610ffdfdedd2fe3","head":{"label":"sichacvah:fifth-task","ref":"fifth-task","sha":"f5bccebe2958958032fd06188610ffdfdedd2fe3","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"repo":{"id":31115461,"name":"flashcards","full_name":"sichacvah/flashcards","owner":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sichacvah/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sichacvah/flashcards","forks_url":"https://api.github.com/repos/sichacvah/flashcards/forks","keys_url":"https://api.github.com/repos/sichacvah/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sichacvah/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sichacvah/flashcards/teams","hooks_url":"https://api.github.com/repos/sichacvah/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sichacvah/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sichacvah/flashcards/events","assignees_url":"https://api.github.com/repos/sichacvah/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sichacvah/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sichacvah/flashcards/tags","blobs_url":"https://api.github.com/repos/sichacvah/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sichacvah/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sichacvah/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sichacvah/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sichacvah/flashcards/languages","stargazers_url":"https://api.github.com/repos/sichacvah/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sichacvah/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sichacvah/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sichacvah/flashcards/subscription","commits_url":"https://api.github.com/repos/sichacvah/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sichacvah/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sichacvah/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sichacvah/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sichacvah/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sichacvah/flashcards/merges","archive_url":"https://api.github.com/repos/sichacvah/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sichacvah/flashcards/downloads","issues_url":"https://api.github.com/repos/sichacvah/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sichacvah/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sichacvah/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sichacvah/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sichacvah/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sichacvah/flashcards/releases{/id}","created_at":"2015-02-21T04:39:19Z","updated_at":"2015-02-24T14:53:01Z","pushed_at":"2015-02-25T01:59:29Z","git_url":"git://github.com/sichacvah/flashcards.git","ssh_url":"git@github.com:sichacvah/flashcards.git","clone_url":"https://github.com/sichacvah/flashcards.git","svn_url":"https://github.com/sichacvah/flashcards","homepage":null,"size":332,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sichacvah:master","ref":"master","sha":"365f40b12552f153392f3bb3ab12124d494e3139","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"repo":{"id":31115461,"name":"flashcards","full_name":"sichacvah/flashcards","owner":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sichacvah/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sichacvah/flashcards","forks_url":"https://api.github.com/repos/sichacvah/flashcards/forks","keys_url":"https://api.github.com/repos/sichacvah/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sichacvah/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sichacvah/flashcards/teams","hooks_url":"https://api.github.com/repos/sichacvah/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sichacvah/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sichacvah/flashcards/events","assignees_url":"https://api.github.com/repos/sichacvah/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sichacvah/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sichacvah/flashcards/tags","blobs_url":"https://api.github.com/repos/sichacvah/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sichacvah/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sichacvah/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sichacvah/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sichacvah/flashcards/languages","stargazers_url":"https://api.github.com/repos/sichacvah/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sichacvah/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sichacvah/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sichacvah/flashcards/subscription","commits_url":"https://api.github.com/repos/sichacvah/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sichacvah/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sichacvah/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sichacvah/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sichacvah/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sichacvah/flashcards/merges","archive_url":"https://api.github.com/repos/sichacvah/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sichacvah/flashcards/downloads","issues_url":"https://api.github.com/repos/sichacvah/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sichacvah/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sichacvah/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sichacvah/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sichacvah/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sichacvah/flashcards/releases{/id}","created_at":"2015-02-21T04:39:19Z","updated_at":"2015-02-24T14:53:01Z","pushed_at":"2015-02-25T01:59:29Z","git_url":"git://github.com/sichacvah/flashcards.git","ssh_url":"git@github.com:sichacvah/flashcards.git","clone_url":"https://github.com/sichacvah/flashcards.git","svn_url":"https://github.com/sichacvah/flashcards","homepage":null,"size":332,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/5"},"html":{"href":"https://github.com/sichacvah/flashcards/pull/5"},"issue":{"href":"https://api.github.com/repos/sichacvah/flashcards/issues/5"},"comments":{"href":"https://api.github.com/repos/sichacvah/flashcards/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/sichacvah/flashcards/statuses/f5bccebe2958958032fd06188610ffdfdedd2fe3"}}}}