{"action":"created","comment":{"url":"https://api.github.com/repos/dima716/flashcards/pulls/comments/23129405","id":23129405,"diff_hunk":"@@ -1,4 +1,18 @@\n class Card < ActiveRecord::Base\n   validates :original_text, :translated_text, presence: { message: \"%{value} не может быть пустым\" }\n   validates_with TextsEqualityValidator\n+\n+  scope :review, -> { where(\"review_date <= ?\", Date.today) }\n+\n+  def equale(user_text)\n+    user_text = user_text.mb_chars.downcase.to_s.strip.squeeze(\" \")\n+    translated_text = self.translated_text.mb_chars.downcase.to_s.strip.squeeze(\" \")","path":"app/models/card.rb","position":9,"original_position":9,"commit_id":"b611c362e88644313010269214f8722f5cd24042","original_commit_id":"b611c362e88644313010269214f8722f5cd24042","user":{"login":"Fodoj","id":78866,"avatar_url":"https://avatars.githubusercontent.com/u/78866?v=3","gravatar_id":"","url":"https://api.github.com/users/Fodoj","html_url":"https://github.com/Fodoj","followers_url":"https://api.github.com/users/Fodoj/followers","following_url":"https://api.github.com/users/Fodoj/following{/other_user}","gists_url":"https://api.github.com/users/Fodoj/gists{/gist_id}","starred_url":"https://api.github.com/users/Fodoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fodoj/subscriptions","organizations_url":"https://api.github.com/users/Fodoj/orgs","repos_url":"https://api.github.com/users/Fodoj/repos","events_url":"https://api.github.com/users/Fodoj/events{/privacy}","received_events_url":"https://api.github.com/users/Fodoj/received_events","type":"User","site_admin":false},"body":"`mb_chars.downcase.to_s.strip.squeeze(\" \")` так и напрашивается на вынесение в отдельный метод :)","created_at":"2015-01-17T23:34:22Z","updated_at":"2015-01-17T23:34:22Z","html_url":"https://github.com/dima716/flashcards/pull/4#discussion_r23129405","pull_request_url":"https://api.github.com/repos/dima716/flashcards/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/comments/23129405"},"html":{"href":"https://github.com/dima716/flashcards/pull/4#discussion_r23129405"},"pull_request":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/dima716/flashcards/pulls/4","id":27561331,"html_url":"https://github.com/dima716/flashcards/pull/4","diff_url":"https://github.com/dima716/flashcards/pull/4.diff","patch_url":"https://github.com/dima716/flashcards/pull/4.patch","issue_url":"https://api.github.com/repos/dima716/flashcards/issues/4","number":4,"state":"open","locked":false,"title":"Implemented simple trainer for memorising words","user":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-17T20:00:29Z","updated_at":"2015-01-17T23:34:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db4f5762054c2e859dcea54e36f0389a4af3f620","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dima716/flashcards/pulls/4/commits","review_comments_url":"https://api.github.com/repos/dima716/flashcards/pulls/4/comments","review_comment_url":"https://api.github.com/repos/dima716/flashcards/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dima716/flashcards/issues/4/comments","statuses_url":"https://api.github.com/repos/dima716/flashcards/statuses/b611c362e88644313010269214f8722f5cd24042","head":{"label":"dima716:fourth-task","ref":"fourth-task","sha":"b611c362e88644313010269214f8722f5cd24042","user":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"repo":{"id":29141095,"name":"flashcards","full_name":"dima716/flashcards","owner":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dima716/flashcards","description":"Application for managing flash cards","fork":false,"url":"https://api.github.com/repos/dima716/flashcards","forks_url":"https://api.github.com/repos/dima716/flashcards/forks","keys_url":"https://api.github.com/repos/dima716/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dima716/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dima716/flashcards/teams","hooks_url":"https://api.github.com/repos/dima716/flashcards/hooks","issue_events_url":"https://api.github.com/repos/dima716/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/dima716/flashcards/events","assignees_url":"https://api.github.com/repos/dima716/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/dima716/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/dima716/flashcards/tags","blobs_url":"https://api.github.com/repos/dima716/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dima716/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dima716/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/dima716/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dima716/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/dima716/flashcards/languages","stargazers_url":"https://api.github.com/repos/dima716/flashcards/stargazers","contributors_url":"https://api.github.com/repos/dima716/flashcards/contributors","subscribers_url":"https://api.github.com/repos/dima716/flashcards/subscribers","subscription_url":"https://api.github.com/repos/dima716/flashcards/subscription","commits_url":"https://api.github.com/repos/dima716/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/dima716/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/dima716/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/dima716/flashcards/issues/comments/{number}","contents_url":"https://api.github.com/repos/dima716/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/dima716/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dima716/flashcards/merges","archive_url":"https://api.github.com/repos/dima716/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dima716/flashcards/downloads","issues_url":"https://api.github.com/repos/dima716/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/dima716/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/dima716/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/dima716/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dima716/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/dima716/flashcards/releases{/id}","created_at":"2015-01-12T15:12:40Z","updated_at":"2015-01-17T19:20:24Z","pushed_at":"2015-01-17T23:08:05Z","git_url":"git://github.com/dima716/flashcards.git","ssh_url":"git@github.com:dima716/flashcards.git","clone_url":"https://github.com/dima716/flashcards.git","svn_url":"https://github.com/dima716/flashcards","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":"dima716:master","ref":"master","sha":"49d8505574f13de09ac9e3c199736a137639e198","user":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"repo":{"id":29141095,"name":"flashcards","full_name":"dima716/flashcards","owner":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dima716/flashcards","description":"Application for managing flash cards","fork":false,"url":"https://api.github.com/repos/dima716/flashcards","forks_url":"https://api.github.com/repos/dima716/flashcards/forks","keys_url":"https://api.github.com/repos/dima716/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dima716/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dima716/flashcards/teams","hooks_url":"https://api.github.com/repos/dima716/flashcards/hooks","issue_events_url":"https://api.github.com/repos/dima716/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/dima716/flashcards/events","assignees_url":"https://api.github.com/repos/dima716/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/dima716/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/dima716/flashcards/tags","blobs_url":"https://api.github.com/repos/dima716/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dima716/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dima716/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/dima716/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dima716/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/dima716/flashcards/languages","stargazers_url":"https://api.github.com/repos/dima716/flashcards/stargazers","contributors_url":"https://api.github.com/repos/dima716/flashcards/contributors","subscribers_url":"https://api.github.com/repos/dima716/flashcards/subscribers","subscription_url":"https://api.github.com/repos/dima716/flashcards/subscription","commits_url":"https://api.github.com/repos/dima716/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/dima716/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/dima716/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/dima716/flashcards/issues/comments/{number}","contents_url":"https://api.github.com/repos/dima716/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/dima716/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dima716/flashcards/merges","archive_url":"https://api.github.com/repos/dima716/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dima716/flashcards/downloads","issues_url":"https://api.github.com/repos/dima716/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/dima716/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/dima716/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/dima716/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dima716/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/dima716/flashcards/releases{/id}","created_at":"2015-01-12T15:12:40Z","updated_at":"2015-01-17T19:20:24Z","pushed_at":"2015-01-17T23:08:05Z","git_url":"git://github.com/dima716/flashcards.git","ssh_url":"git@github.com:dima716/flashcards.git","clone_url":"https://github.com/dima716/flashcards.git","svn_url":"https://github.com/dima716/flashcards","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/dima716/flashcards/pulls/4"},"html":{"href":"https://github.com/dima716/flashcards/pull/4"},"issue":{"href":"https://api.github.com/repos/dima716/flashcards/issues/4"},"comments":{"href":"https://api.github.com/repos/dima716/flashcards/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/dima716/flashcards/statuses/b611c362e88644313010269214f8722f5cd24042"}}}}