{"action":"created","comment":{"url":"https://api.github.com/repos/Bezbo/flashcards/pulls/comments/33354943","id":33354943,"diff_hunk":"@@ -3,10 +3,21 @@ class User < ActiveRecord::Base\n     config.authentications_class = Authentication\n   end\n   has_many :cards, dependent: :destroy\n+  has_many :decks, dependent: :destroy\n+  has_one  :current_deck, ->(user) { where(\"id = ?\", user.current_deck_id) },","path":"app/models/user.rb","position":5,"original_position":5,"commit_id":"5fa193592b7db3fad1af29f3fbaba96846a82b7a","original_commit_id":"5fa193592b7db3fad1af29f3fbaba96846a82b7a","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":"`belongs_to :current_deck, class_name: \"Deck\"`  и т.д. http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/belongs_to\r\n","created_at":"2015-06-26T13:25:13Z","updated_at":"2015-06-26T13:25:13Z","html_url":"https://github.com/Bezbo/flashcards/pull/11#discussion_r33354943","pull_request_url":"https://api.github.com/repos/Bezbo/flashcards/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/Bezbo/flashcards/pulls/comments/33354943"},"html":{"href":"https://github.com/Bezbo/flashcards/pull/11#discussion_r33354943"},"pull_request":{"href":"https://api.github.com/repos/Bezbo/flashcards/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/Bezbo/flashcards/pulls/11","id":38335920,"html_url":"https://github.com/Bezbo/flashcards/pull/11","diff_url":"https://github.com/Bezbo/flashcards/pull/11.diff","patch_url":"https://github.com/Bezbo/flashcards/pull/11.patch","issue_url":"https://api.github.com/repos/Bezbo/flashcards/issues/11","number":11,"state":"open","locked":false,"title":"Eleventh task","user":{"login":"Bezbo","id":4949123,"avatar_url":"https://avatars.githubusercontent.com/u/4949123?v=3","gravatar_id":"","url":"https://api.github.com/users/Bezbo","html_url":"https://github.com/Bezbo","followers_url":"https://api.github.com/users/Bezbo/followers","following_url":"https://api.github.com/users/Bezbo/following{/other_user}","gists_url":"https://api.github.com/users/Bezbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Bezbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bezbo/subscriptions","organizations_url":"https://api.github.com/users/Bezbo/orgs","repos_url":"https://api.github.com/users/Bezbo/repos","events_url":"https://api.github.com/users/Bezbo/events{/privacy}","received_events_url":"https://api.github.com/users/Bezbo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-23T13:27:13Z","updated_at":"2015-06-26T13:25:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50ee14198ade9bfdc3da23fe66b379609742d931","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Bezbo/flashcards/pulls/11/commits","review_comments_url":"https://api.github.com/repos/Bezbo/flashcards/pulls/11/comments","review_comment_url":"https://api.github.com/repos/Bezbo/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Bezbo/flashcards/issues/11/comments","statuses_url":"https://api.github.com/repos/Bezbo/flashcards/statuses/5fa193592b7db3fad1af29f3fbaba96846a82b7a","head":{"label":"Bezbo:eleventh_task","ref":"eleventh_task","sha":"5fa193592b7db3fad1af29f3fbaba96846a82b7a","user":{"login":"Bezbo","id":4949123,"avatar_url":"https://avatars.githubusercontent.com/u/4949123?v=3","gravatar_id":"","url":"https://api.github.com/users/Bezbo","html_url":"https://github.com/Bezbo","followers_url":"https://api.github.com/users/Bezbo/followers","following_url":"https://api.github.com/users/Bezbo/following{/other_user}","gists_url":"https://api.github.com/users/Bezbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Bezbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bezbo/subscriptions","organizations_url":"https://api.github.com/users/Bezbo/orgs","repos_url":"https://api.github.com/users/Bezbo/repos","events_url":"https://api.github.com/users/Bezbo/events{/privacy}","received_events_url":"https://api.github.com/users/Bezbo/received_events","type":"User","site_admin":false},"repo":{"id":37122927,"name":"flashcards","full_name":"Bezbo/flashcards","owner":{"login":"Bezbo","id":4949123,"avatar_url":"https://avatars.githubusercontent.com/u/4949123?v=3","gravatar_id":"","url":"https://api.github.com/users/Bezbo","html_url":"https://github.com/Bezbo","followers_url":"https://api.github.com/users/Bezbo/followers","following_url":"https://api.github.com/users/Bezbo/following{/other_user}","gists_url":"https://api.github.com/users/Bezbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Bezbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bezbo/subscriptions","organizations_url":"https://api.github.com/users/Bezbo/orgs","repos_url":"https://api.github.com/users/Bezbo/repos","events_url":"https://api.github.com/users/Bezbo/events{/privacy}","received_events_url":"https://api.github.com/users/Bezbo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bezbo/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/Bezbo/flashcards","forks_url":"https://api.github.com/repos/Bezbo/flashcards/forks","keys_url":"https://api.github.com/repos/Bezbo/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bezbo/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bezbo/flashcards/teams","hooks_url":"https://api.github.com/repos/Bezbo/flashcards/hooks","issue_events_url":"https://api.github.com/repos/Bezbo/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/Bezbo/flashcards/events","assignees_url":"https://api.github.com/repos/Bezbo/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/Bezbo/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/Bezbo/flashcards/tags","blobs_url":"https://api.github.com/repos/Bezbo/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bezbo/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bezbo/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bezbo/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bezbo/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/Bezbo/flashcards/languages","stargazers_url":"https://api.github.com/repos/Bezbo/flashcards/stargazers","contributors_url":"https://api.github.com/repos/Bezbo/flashcards/contributors","subscribers_url":"https://api.github.com/repos/Bezbo/flashcards/subscribers","subscription_url":"https://api.github.com/repos/Bezbo/flashcards/subscription","commits_url":"https://api.github.com/repos/Bezbo/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bezbo/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bezbo/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bezbo/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bezbo/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/Bezbo/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bezbo/flashcards/merges","archive_url":"https://api.github.com/repos/Bezbo/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bezbo/flashcards/downloads","issues_url":"https://api.github.com/repos/Bezbo/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/Bezbo/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/Bezbo/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/Bezbo/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bezbo/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/Bezbo/flashcards/releases{/id}","created_at":"2015-06-09T09:28:45Z","updated_at":"2015-06-09T22:44:53Z","pushed_at":"2015-06-25T21:49:11Z","git_url":"git://github.com/Bezbo/flashcards.git","ssh_url":"git@github.com:Bezbo/flashcards.git","clone_url":"https://github.com/Bezbo/flashcards.git","svn_url":"https://github.com/Bezbo/flashcards","homepage":null,"size":792,"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":"Bezbo:master","ref":"master","sha":"912e3f332f1caf17823e831a0d6aa4adf272def5","user":{"login":"Bezbo","id":4949123,"avatar_url":"https://avatars.githubusercontent.com/u/4949123?v=3","gravatar_id":"","url":"https://api.github.com/users/Bezbo","html_url":"https://github.com/Bezbo","followers_url":"https://api.github.com/users/Bezbo/followers","following_url":"https://api.github.com/users/Bezbo/following{/other_user}","gists_url":"https://api.github.com/users/Bezbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Bezbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bezbo/subscriptions","organizations_url":"https://api.github.com/users/Bezbo/orgs","repos_url":"https://api.github.com/users/Bezbo/repos","events_url":"https://api.github.com/users/Bezbo/events{/privacy}","received_events_url":"https://api.github.com/users/Bezbo/received_events","type":"User","site_admin":false},"repo":{"id":37122927,"name":"flashcards","full_name":"Bezbo/flashcards","owner":{"login":"Bezbo","id":4949123,"avatar_url":"https://avatars.githubusercontent.com/u/4949123?v=3","gravatar_id":"","url":"https://api.github.com/users/Bezbo","html_url":"https://github.com/Bezbo","followers_url":"https://api.github.com/users/Bezbo/followers","following_url":"https://api.github.com/users/Bezbo/following{/other_user}","gists_url":"https://api.github.com/users/Bezbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Bezbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bezbo/subscriptions","organizations_url":"https://api.github.com/users/Bezbo/orgs","repos_url":"https://api.github.com/users/Bezbo/repos","events_url":"https://api.github.com/users/Bezbo/events{/privacy}","received_events_url":"https://api.github.com/users/Bezbo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bezbo/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/Bezbo/flashcards","forks_url":"https://api.github.com/repos/Bezbo/flashcards/forks","keys_url":"https://api.github.com/repos/Bezbo/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bezbo/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bezbo/flashcards/teams","hooks_url":"https://api.github.com/repos/Bezbo/flashcards/hooks","issue_events_url":"https://api.github.com/repos/Bezbo/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/Bezbo/flashcards/events","assignees_url":"https://api.github.com/repos/Bezbo/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/Bezbo/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/Bezbo/flashcards/tags","blobs_url":"https://api.github.com/repos/Bezbo/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bezbo/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bezbo/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bezbo/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bezbo/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/Bezbo/flashcards/languages","stargazers_url":"https://api.github.com/repos/Bezbo/flashcards/stargazers","contributors_url":"https://api.github.com/repos/Bezbo/flashcards/contributors","subscribers_url":"https://api.github.com/repos/Bezbo/flashcards/subscribers","subscription_url":"https://api.github.com/repos/Bezbo/flashcards/subscription","commits_url":"https://api.github.com/repos/Bezbo/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bezbo/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bezbo/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bezbo/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bezbo/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/Bezbo/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bezbo/flashcards/merges","archive_url":"https://api.github.com/repos/Bezbo/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bezbo/flashcards/downloads","issues_url":"https://api.github.com/repos/Bezbo/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/Bezbo/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/Bezbo/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/Bezbo/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bezbo/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/Bezbo/flashcards/releases{/id}","created_at":"2015-06-09T09:28:45Z","updated_at":"2015-06-09T22:44:53Z","pushed_at":"2015-06-25T21:49:11Z","git_url":"git://github.com/Bezbo/flashcards.git","ssh_url":"git@github.com:Bezbo/flashcards.git","clone_url":"https://github.com/Bezbo/flashcards.git","svn_url":"https://github.com/Bezbo/flashcards","homepage":null,"size":792,"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/Bezbo/flashcards/pulls/11"},"html":{"href":"https://github.com/Bezbo/flashcards/pull/11"},"issue":{"href":"https://api.github.com/repos/Bezbo/flashcards/issues/11"},"comments":{"href":"https://api.github.com/repos/Bezbo/flashcards/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/Bezbo/flashcards/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/Bezbo/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Bezbo/flashcards/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/Bezbo/flashcards/statuses/5fa193592b7db3fad1af29f3fbaba96846a82b7a"}}}}