{"action":"created","comment":{"url":"https://api.github.com/repos/dima716/flashcards/pulls/comments/23905375","id":23905375,"diff_hunk":"@@ -0,0 +1,17 @@\n+class Deck < ActiveRecord::Base\n+  has_many :cards, dependent: :destroy\n+  belongs_to :user\n+\n+  has_attached_file :picture, styles: { medium: \"200x200#\" }\n+  validates_attachment_content_type :picture, content_type: /\\Aimage/\n+  validates_attachment_file_name :picture, matches: [/png\\Z/, /jpe?g\\Z/]\n+\n+  validates :user, :name, presence: true\n+\n+  scope :current_deck, -> { where(\"current = ?\", true) }\n+\n+  def change_current_deck(current_deck)\n+    current_deck.update_attributes(current: false)","path":"app/models/deck.rb","position":14,"original_position":14,"commit_id":"a36ddcfa390c59e63bffb3481b0899c8d505c68e","original_commit_id":"a36ddcfa390c59e63bffb3481b0899c8d505c68e","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":"тут ты взял и убрал текущую колоду у всех пользователей.","created_at":"2015-02-02T03:07:57Z","updated_at":"2015-02-02T03:07:57Z","html_url":"https://github.com/dima716/flashcards/pull/10#discussion_r23905375","pull_request_url":"https://api.github.com/repos/dima716/flashcards/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/comments/23905375"},"html":{"href":"https://github.com/dima716/flashcards/pull/10#discussion_r23905375"},"pull_request":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/dima716/flashcards/pulls/10","id":28417018,"html_url":"https://github.com/dima716/flashcards/pull/10","diff_url":"https://github.com/dima716/flashcards/pull/10.diff","patch_url":"https://github.com/dima716/flashcards/pull/10.patch","issue_url":"https://api.github.com/repos/dima716/flashcards/issues/10","number":10,"state":"open","locked":false,"title":"Tenth task","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-31T16:29:41Z","updated_at":"2015-02-02T03:07:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6f6175e2746e92d82f813c9b7e437a7698efdda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dima716/flashcards/pulls/10/commits","review_comments_url":"https://api.github.com/repos/dima716/flashcards/pulls/10/comments","review_comment_url":"https://api.github.com/repos/dima716/flashcards/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dima716/flashcards/issues/10/comments","statuses_url":"https://api.github.com/repos/dima716/flashcards/statuses/a36ddcfa390c59e63bffb3481b0899c8d505c68e","head":{"label":"dima716:tenth_task","ref":"tenth_task","sha":"a36ddcfa390c59e63bffb3481b0899c8d505c68e","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-29T20:49:45Z","pushed_at":"2015-02-01T21:23:16Z","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":868,"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":"311b29a4284a2be04bfb9c5a861c519c5b5b7cad","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-29T20:49:45Z","pushed_at":"2015-02-01T21:23:16Z","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":868,"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/10"},"html":{"href":"https://github.com/dima716/flashcards/pull/10"},"issue":{"href":"https://api.github.com/repos/dima716/flashcards/issues/10"},"comments":{"href":"https://api.github.com/repos/dima716/flashcards/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dima716/flashcards/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/dima716/flashcards/statuses/a36ddcfa390c59e63bffb3481b0899c8d505c68e"}}}}