{"action":"created","comment":{"url":"https://api.github.com/repos/tomasina/flashcards/pulls/comments/25374162","id":25374162,"diff_hunk":"@@ -1,4 +1,14 @@\n class Card < ActiveRecord::Base\n+\n+  validates :original_text, :translated_text, :review_date, presence: true\n+\n+  validate :valid_original\n+  def valid_original\n+    if original_text.to_s.downcase == translated_text.to_s.downcase\n+      errors.add(:original_text, \"texts shouldn't match\")\n+    end\n+  end\n+\n   def create","path":"app/models/card.rb","position":12,"original_position":12,"commit_id":"4bc1b72586fb88d0380098a9c6df55e7e3e5d84e","original_commit_id":"4bc1b72586fb88d0380098a9c6df55e7e3e5d84e","user":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"body":"что именно? проверку на совпадение оригинального и переведенного текста сделала. нужно было использовать что?","created_at":"2015-02-25T20:09:36Z","updated_at":"2015-02-25T20:09:36Z","html_url":"https://github.com/tomasina/flashcards/pull/3#discussion_r25374162","pull_request_url":"https://api.github.com/repos/tomasina/flashcards/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/tomasina/flashcards/pulls/comments/25374162"},"html":{"href":"https://github.com/tomasina/flashcards/pull/3#discussion_r25374162"},"pull_request":{"href":"https://api.github.com/repos/tomasina/flashcards/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/tomasina/flashcards/pulls/3","id":29902376,"html_url":"https://github.com/tomasina/flashcards/pull/3","diff_url":"https://github.com/tomasina/flashcards/pull/3.diff","patch_url":"https://github.com/tomasina/flashcards/pull/3.patch","issue_url":"https://api.github.com/repos/tomasina/flashcards/issues/3","number":3,"state":"open","locked":false,"title":"Third task","user":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-24T14:41:55Z","updated_at":"2015-02-25T20:09:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc88675926a8fbfe27b0902045825a29a7144866","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tomasina/flashcards/pulls/3/commits","review_comments_url":"https://api.github.com/repos/tomasina/flashcards/pulls/3/comments","review_comment_url":"https://api.github.com/repos/tomasina/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomasina/flashcards/issues/3/comments","statuses_url":"https://api.github.com/repos/tomasina/flashcards/statuses/4bc1b72586fb88d0380098a9c6df55e7e3e5d84e","head":{"label":"tomasina:third-task","ref":"third-task","sha":"4bc1b72586fb88d0380098a9c6df55e7e3e5d84e","user":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"repo":{"id":29734733,"name":"flashcards","full_name":"tomasina/flashcards","owner":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomasina/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/tomasina/flashcards","forks_url":"https://api.github.com/repos/tomasina/flashcards/forks","keys_url":"https://api.github.com/repos/tomasina/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomasina/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomasina/flashcards/teams","hooks_url":"https://api.github.com/repos/tomasina/flashcards/hooks","issue_events_url":"https://api.github.com/repos/tomasina/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/tomasina/flashcards/events","assignees_url":"https://api.github.com/repos/tomasina/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/tomasina/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/tomasina/flashcards/tags","blobs_url":"https://api.github.com/repos/tomasina/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomasina/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomasina/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomasina/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomasina/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/tomasina/flashcards/languages","stargazers_url":"https://api.github.com/repos/tomasina/flashcards/stargazers","contributors_url":"https://api.github.com/repos/tomasina/flashcards/contributors","subscribers_url":"https://api.github.com/repos/tomasina/flashcards/subscribers","subscription_url":"https://api.github.com/repos/tomasina/flashcards/subscription","commits_url":"https://api.github.com/repos/tomasina/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomasina/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomasina/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomasina/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomasina/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/tomasina/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomasina/flashcards/merges","archive_url":"https://api.github.com/repos/tomasina/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomasina/flashcards/downloads","issues_url":"https://api.github.com/repos/tomasina/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/tomasina/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/tomasina/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/tomasina/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomasina/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/tomasina/flashcards/releases{/id}","created_at":"2015-01-23T14:00:57Z","updated_at":"2015-02-17T14:26:34Z","pushed_at":"2015-02-25T16:38:34Z","git_url":"git://github.com/tomasina/flashcards.git","ssh_url":"git@github.com:tomasina/flashcards.git","clone_url":"https://github.com/tomasina/flashcards.git","svn_url":"https://github.com/tomasina/flashcards","homepage":null,"size":272,"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":"tomasina:master","ref":"master","sha":"39319f145c12828f53ff69a4fcc6a2f4b7c2ea18","user":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"repo":{"id":29734733,"name":"flashcards","full_name":"tomasina/flashcards","owner":{"login":"tomasina","id":10087153,"avatar_url":"https://avatars.githubusercontent.com/u/10087153?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasina","html_url":"https://github.com/tomasina","followers_url":"https://api.github.com/users/tomasina/followers","following_url":"https://api.github.com/users/tomasina/following{/other_user}","gists_url":"https://api.github.com/users/tomasina/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasina/subscriptions","organizations_url":"https://api.github.com/users/tomasina/orgs","repos_url":"https://api.github.com/users/tomasina/repos","events_url":"https://api.github.com/users/tomasina/events{/privacy}","received_events_url":"https://api.github.com/users/tomasina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomasina/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/tomasina/flashcards","forks_url":"https://api.github.com/repos/tomasina/flashcards/forks","keys_url":"https://api.github.com/repos/tomasina/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomasina/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomasina/flashcards/teams","hooks_url":"https://api.github.com/repos/tomasina/flashcards/hooks","issue_events_url":"https://api.github.com/repos/tomasina/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/tomasina/flashcards/events","assignees_url":"https://api.github.com/repos/tomasina/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/tomasina/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/tomasina/flashcards/tags","blobs_url":"https://api.github.com/repos/tomasina/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomasina/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomasina/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomasina/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomasina/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/tomasina/flashcards/languages","stargazers_url":"https://api.github.com/repos/tomasina/flashcards/stargazers","contributors_url":"https://api.github.com/repos/tomasina/flashcards/contributors","subscribers_url":"https://api.github.com/repos/tomasina/flashcards/subscribers","subscription_url":"https://api.github.com/repos/tomasina/flashcards/subscription","commits_url":"https://api.github.com/repos/tomasina/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomasina/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomasina/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomasina/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomasina/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/tomasina/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomasina/flashcards/merges","archive_url":"https://api.github.com/repos/tomasina/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomasina/flashcards/downloads","issues_url":"https://api.github.com/repos/tomasina/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/tomasina/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/tomasina/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/tomasina/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomasina/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/tomasina/flashcards/releases{/id}","created_at":"2015-01-23T14:00:57Z","updated_at":"2015-02-17T14:26:34Z","pushed_at":"2015-02-25T16:38:34Z","git_url":"git://github.com/tomasina/flashcards.git","ssh_url":"git@github.com:tomasina/flashcards.git","clone_url":"https://github.com/tomasina/flashcards.git","svn_url":"https://github.com/tomasina/flashcards","homepage":null,"size":272,"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/tomasina/flashcards/pulls/3"},"html":{"href":"https://github.com/tomasina/flashcards/pull/3"},"issue":{"href":"https://api.github.com/repos/tomasina/flashcards/issues/3"},"comments":{"href":"https://api.github.com/repos/tomasina/flashcards/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/tomasina/flashcards/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/tomasina/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomasina/flashcards/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/tomasina/flashcards/statuses/4bc1b72586fb88d0380098a9c6df55e7e3e5d84e"}}}}