{"action":"created","comment":{"url":"https://api.github.com/repos/tomtl/myflix/pulls/comments/30436648","id":30436648,"diff_hunk":"@@ -4,5 +4,16 @@ class User < ActiveRecord::Base\n \n   has_secure_password\n \n-  has_many :queue_items\n+  has_many :queue_items, -> { order('position') }\n+  has_many :reviews\n+  \n+  def normalize_queue_item_positions\n+    queue_items.each_with_index do |queue_item, index|\n+      queue_item.update_attributes(position: index +1)","path":"app/models/user.rb","position":10,"original_position":10,"commit_id":"f563aab4644ed399f9346b2a8e4d5d5b30367ffe","original_commit_id":"f563aab4644ed399f9346b2a8e4d5d5b30367ffe","user":{"login":"tomtomecek","id":7385469,"avatar_url":"https://avatars.githubusercontent.com/u/7385469?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtomecek","html_url":"https://github.com/tomtomecek","followers_url":"https://api.github.com/users/tomtomecek/followers","following_url":"https://api.github.com/users/tomtomecek/following{/other_user}","gists_url":"https://api.github.com/users/tomtomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtomecek/subscriptions","organizations_url":"https://api.github.com/users/tomtomecek/orgs","repos_url":"https://api.github.com/users/tomtomecek/repos","events_url":"https://api.github.com/users/tomtomecek/events{/privacy}","received_events_url":"https://api.github.com/users/tomtomecek/received_events","type":"User","site_admin":false},"body":"There is a missing space after `+`","created_at":"2015-05-15T19:06:51Z","updated_at":"2015-05-15T19:06:51Z","html_url":"https://github.com/tomtl/myflix/pull/3#discussion_r30436648","pull_request_url":"https://api.github.com/repos/tomtl/myflix/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/tomtl/myflix/pulls/comments/30436648"},"html":{"href":"https://github.com/tomtl/myflix/pull/3#discussion_r30436648"},"pull_request":{"href":"https://api.github.com/repos/tomtl/myflix/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/tomtl/myflix/pulls/3","id":35540850,"html_url":"https://github.com/tomtl/myflix/pull/3","diff_url":"https://github.com/tomtl/myflix/pull/3.diff","patch_url":"https://github.com/tomtl/myflix/pull/3.patch","issue_url":"https://api.github.com/repos/tomtl/myflix/issues/3","number":3,"state":"open","locked":false,"title":"Mod3","user":{"login":"tomtl","id":10532231,"avatar_url":"https://avatars.githubusercontent.com/u/10532231?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtl","html_url":"https://github.com/tomtl","followers_url":"https://api.github.com/users/tomtl/followers","following_url":"https://api.github.com/users/tomtl/following{/other_user}","gists_url":"https://api.github.com/users/tomtl/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtl/subscriptions","organizations_url":"https://api.github.com/users/tomtl/orgs","repos_url":"https://api.github.com/users/tomtl/repos","events_url":"https://api.github.com/users/tomtl/events{/privacy}","received_events_url":"https://api.github.com/users/tomtl/received_events","type":"User","site_admin":false},"body":"End of week three.","created_at":"2015-05-15T18:58:39Z","updated_at":"2015-05-15T19:06:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"367cd10731140a71e5ec8473468a12e6ecbb153b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tomtl/myflix/pulls/3/commits","review_comments_url":"https://api.github.com/repos/tomtl/myflix/pulls/3/comments","review_comment_url":"https://api.github.com/repos/tomtl/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomtl/myflix/issues/3/comments","statuses_url":"https://api.github.com/repos/tomtl/myflix/statuses/f563aab4644ed399f9346b2a8e4d5d5b30367ffe","head":{"label":"tomtl:mod3","ref":"mod3","sha":"f563aab4644ed399f9346b2a8e4d5d5b30367ffe","user":{"login":"tomtl","id":10532231,"avatar_url":"https://avatars.githubusercontent.com/u/10532231?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtl","html_url":"https://github.com/tomtl","followers_url":"https://api.github.com/users/tomtl/followers","following_url":"https://api.github.com/users/tomtl/following{/other_user}","gists_url":"https://api.github.com/users/tomtl/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtl/subscriptions","organizations_url":"https://api.github.com/users/tomtl/orgs","repos_url":"https://api.github.com/users/tomtl/repos","events_url":"https://api.github.com/users/tomtl/events{/privacy}","received_events_url":"https://api.github.com/users/tomtl/received_events","type":"User","site_admin":false},"repo":{"id":34055457,"name":"myflix","full_name":"tomtl/myflix","owner":{"login":"tomtl","id":10532231,"avatar_url":"https://avatars.githubusercontent.com/u/10532231?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtl","html_url":"https://github.com/tomtl","followers_url":"https://api.github.com/users/tomtl/followers","following_url":"https://api.github.com/users/tomtl/following{/other_user}","gists_url":"https://api.github.com/users/tomtl/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtl/subscriptions","organizations_url":"https://api.github.com/users/tomtl/orgs","repos_url":"https://api.github.com/users/tomtl/repos","events_url":"https://api.github.com/users/tomtl/events{/privacy}","received_events_url":"https://api.github.com/users/tomtl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomtl/myflix","description":"Tealeaf course 3 pre-course app.","fork":false,"url":"https://api.github.com/repos/tomtl/myflix","forks_url":"https://api.github.com/repos/tomtl/myflix/forks","keys_url":"https://api.github.com/repos/tomtl/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomtl/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomtl/myflix/teams","hooks_url":"https://api.github.com/repos/tomtl/myflix/hooks","issue_events_url":"https://api.github.com/repos/tomtl/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/tomtl/myflix/events","assignees_url":"https://api.github.com/repos/tomtl/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/tomtl/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/tomtl/myflix/tags","blobs_url":"https://api.github.com/repos/tomtl/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomtl/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomtl/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomtl/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomtl/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/tomtl/myflix/languages","stargazers_url":"https://api.github.com/repos/tomtl/myflix/stargazers","contributors_url":"https://api.github.com/repos/tomtl/myflix/contributors","subscribers_url":"https://api.github.com/repos/tomtl/myflix/subscribers","subscription_url":"https://api.github.com/repos/tomtl/myflix/subscription","commits_url":"https://api.github.com/repos/tomtl/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomtl/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomtl/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomtl/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomtl/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/tomtl/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomtl/myflix/merges","archive_url":"https://api.github.com/repos/tomtl/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomtl/myflix/downloads","issues_url":"https://api.github.com/repos/tomtl/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/tomtl/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/tomtl/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/tomtl/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomtl/myflix/labels{/name}","releases_url":"https://api.github.com/repos/tomtl/myflix/releases{/id}","created_at":"2015-04-16T12:50:04Z","updated_at":"2015-04-30T16:25:28Z","pushed_at":"2015-05-15T18:58:39Z","git_url":"git://github.com/tomtl/myflix.git","ssh_url":"git@github.com:tomtl/myflix.git","clone_url":"https://github.com/tomtl/myflix.git","svn_url":"https://github.com/tomtl/myflix","homepage":"","size":512,"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":"tomtl:master","ref":"master","sha":"4ae5d915bf9c7d8191ac4244d25f90505d8bb65c","user":{"login":"tomtl","id":10532231,"avatar_url":"https://avatars.githubusercontent.com/u/10532231?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtl","html_url":"https://github.com/tomtl","followers_url":"https://api.github.com/users/tomtl/followers","following_url":"https://api.github.com/users/tomtl/following{/other_user}","gists_url":"https://api.github.com/users/tomtl/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtl/subscriptions","organizations_url":"https://api.github.com/users/tomtl/orgs","repos_url":"https://api.github.com/users/tomtl/repos","events_url":"https://api.github.com/users/tomtl/events{/privacy}","received_events_url":"https://api.github.com/users/tomtl/received_events","type":"User","site_admin":false},"repo":{"id":34055457,"name":"myflix","full_name":"tomtl/myflix","owner":{"login":"tomtl","id":10532231,"avatar_url":"https://avatars.githubusercontent.com/u/10532231?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtl","html_url":"https://github.com/tomtl","followers_url":"https://api.github.com/users/tomtl/followers","following_url":"https://api.github.com/users/tomtl/following{/other_user}","gists_url":"https://api.github.com/users/tomtl/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtl/subscriptions","organizations_url":"https://api.github.com/users/tomtl/orgs","repos_url":"https://api.github.com/users/tomtl/repos","events_url":"https://api.github.com/users/tomtl/events{/privacy}","received_events_url":"https://api.github.com/users/tomtl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomtl/myflix","description":"Tealeaf course 3 pre-course app.","fork":false,"url":"https://api.github.com/repos/tomtl/myflix","forks_url":"https://api.github.com/repos/tomtl/myflix/forks","keys_url":"https://api.github.com/repos/tomtl/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomtl/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomtl/myflix/teams","hooks_url":"https://api.github.com/repos/tomtl/myflix/hooks","issue_events_url":"https://api.github.com/repos/tomtl/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/tomtl/myflix/events","assignees_url":"https://api.github.com/repos/tomtl/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/tomtl/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/tomtl/myflix/tags","blobs_url":"https://api.github.com/repos/tomtl/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomtl/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomtl/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomtl/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomtl/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/tomtl/myflix/languages","stargazers_url":"https://api.github.com/repos/tomtl/myflix/stargazers","contributors_url":"https://api.github.com/repos/tomtl/myflix/contributors","subscribers_url":"https://api.github.com/repos/tomtl/myflix/subscribers","subscription_url":"https://api.github.com/repos/tomtl/myflix/subscription","commits_url":"https://api.github.com/repos/tomtl/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomtl/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomtl/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomtl/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomtl/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/tomtl/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomtl/myflix/merges","archive_url":"https://api.github.com/repos/tomtl/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomtl/myflix/downloads","issues_url":"https://api.github.com/repos/tomtl/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/tomtl/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/tomtl/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/tomtl/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomtl/myflix/labels{/name}","releases_url":"https://api.github.com/repos/tomtl/myflix/releases{/id}","created_at":"2015-04-16T12:50:04Z","updated_at":"2015-04-30T16:25:28Z","pushed_at":"2015-05-15T18:58:39Z","git_url":"git://github.com/tomtl/myflix.git","ssh_url":"git@github.com:tomtl/myflix.git","clone_url":"https://github.com/tomtl/myflix.git","svn_url":"https://github.com/tomtl/myflix","homepage":"","size":512,"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/tomtl/myflix/pulls/3"},"html":{"href":"https://github.com/tomtl/myflix/pull/3"},"issue":{"href":"https://api.github.com/repos/tomtl/myflix/issues/3"},"comments":{"href":"https://api.github.com/repos/tomtl/myflix/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/tomtl/myflix/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/tomtl/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomtl/myflix/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/tomtl/myflix/statuses/f563aab4644ed399f9346b2a8e4d5d5b30367ffe"}}}}