{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/comments/40732598","id":40732598,"diff_hunk":"@@ -1,4 +1,5 @@\n class Article < ActiveRecord::Base\n+  belongs_to :user","path":"app/models/article.rb","position":2,"original_position":2,"commit_id":"6bcf3f89a0564f4cf38edc9f09719f927a07dd23","original_commit_id":"6bcf3f89a0564f4cf38edc9f09719f927a07dd23","user":{"login":"Dinuuu","id":1182459,"avatar_url":"https://avatars.githubusercontent.com/u/1182459?v=3","gravatar_id":"","url":"https://api.github.com/users/Dinuuu","html_url":"https://github.com/Dinuuu","followers_url":"https://api.github.com/users/Dinuuu/followers","following_url":"https://api.github.com/users/Dinuuu/following{/other_user}","gists_url":"https://api.github.com/users/Dinuuu/gists{/gist_id}","starred_url":"https://api.github.com/users/Dinuuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dinuuu/subscriptions","organizations_url":"https://api.github.com/users/Dinuuu/orgs","repos_url":"https://api.github.com/users/Dinuuu/repos","events_url":"https://api.github.com/users/Dinuuu/events{/privacy}","received_events_url":"https://api.github.com/users/Dinuuu/received_events","type":"User","site_admin":false},"body":"you should also validate that this user is present in the article","created_at":"2015-09-29T21:30:22Z","updated_at":"2015-09-29T21:30:22Z","html_url":"https://github.com/wolox-training/igc-rails/pull/11#discussion_r40732598","pull_request_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/comments/40732598"},"html":{"href":"https://github.com/wolox-training/igc-rails/pull/11#discussion_r40732598"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11","id":46315006,"html_url":"https://github.com/wolox-training/igc-rails/pull/11","diff_url":"https://github.com/wolox-training/igc-rails/pull/11.diff","patch_url":"https://github.com/wolox-training/igc-rails/pull/11.patch","issue_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/11","number":11,"state":"open","locked":false,"title":"Author for articles","user":{"login":"IgnacioColuccio","id":757205,"avatar_url":"https://avatars.githubusercontent.com/u/757205?v=3","gravatar_id":"","url":"https://api.github.com/users/IgnacioColuccio","html_url":"https://github.com/IgnacioColuccio","followers_url":"https://api.github.com/users/IgnacioColuccio/followers","following_url":"https://api.github.com/users/IgnacioColuccio/following{/other_user}","gists_url":"https://api.github.com/users/IgnacioColuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/IgnacioColuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgnacioColuccio/subscriptions","organizations_url":"https://api.github.com/users/IgnacioColuccio/orgs","repos_url":"https://api.github.com/users/IgnacioColuccio/repos","events_url":"https://api.github.com/users/IgnacioColuccio/events{/privacy}","received_events_url":"https://api.github.com/users/IgnacioColuccio/received_events","type":"User","site_admin":false},"body":"### Summary\r\n- Added user field for commentaries\r\n- Added access control for articles (can't edit unless it's your own post)\r\nNote: Specs are missing, assign this back to me if you want the relationship to be tested.\r\n\r\n### Trello card\r\nhttps://trello.com/c/0Mvva2Lb/29-agregarle-creador-a-los-articulos-y-comentarios\r\n\r\n### Test plan\r\n1. Create a post while logged out.\r\n2. It should redirect to the sign up page.\r\n3. After signing up or signing in, you should be able to create posts.\r\n4. Login as someone else and create a post.\r\n5. It should be possible to edit your own posts but not the one from the first user. ","created_at":"2015-09-29T18:38:58Z","updated_at":"2015-09-29T21:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47c61a71cc0dbc99e954d8dc203dbf0e00a024e2","assignee":{"login":"Dinuuu","id":1182459,"avatar_url":"https://avatars.githubusercontent.com/u/1182459?v=3","gravatar_id":"","url":"https://api.github.com/users/Dinuuu","html_url":"https://github.com/Dinuuu","followers_url":"https://api.github.com/users/Dinuuu/followers","following_url":"https://api.github.com/users/Dinuuu/following{/other_user}","gists_url":"https://api.github.com/users/Dinuuu/gists{/gist_id}","starred_url":"https://api.github.com/users/Dinuuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dinuuu/subscriptions","organizations_url":"https://api.github.com/users/Dinuuu/orgs","repos_url":"https://api.github.com/users/Dinuuu/repos","events_url":"https://api.github.com/users/Dinuuu/events{/privacy}","received_events_url":"https://api.github.com/users/Dinuuu/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11/commits","review_comments_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11/comments","review_comment_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/11/comments","statuses_url":"https://api.github.com/repos/wolox-training/igc-rails/statuses/6bcf3f89a0564f4cf38edc9f09719f927a07dd23","head":{"label":"wolox-training:article_author","ref":"article_author","sha":"6bcf3f89a0564f4cf38edc9f09719f927a07dd23","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"User","site_admin":false},"repo":{"id":42865002,"name":"igc-rails","full_name":"wolox-training/igc-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/igc-rails","description":"Training Ignacio Coluccio","fork":false,"url":"https://api.github.com/repos/wolox-training/igc-rails","forks_url":"https://api.github.com/repos/wolox-training/igc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/igc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/igc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/igc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/igc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/igc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/igc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/igc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/igc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/igc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/igc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/igc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/igc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/igc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/igc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/igc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/igc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/igc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/igc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/igc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/igc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/igc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/igc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/igc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/igc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/igc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/igc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/igc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/igc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/igc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/igc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/igc-rails/releases{/id}","created_at":"2015-09-21T12:30:50Z","updated_at":"2015-09-22T12:56:57Z","pushed_at":"2015-09-29T19:33:08Z","git_url":"git://github.com/wolox-training/igc-rails.git","ssh_url":"git@github.com:wolox-training/igc-rails.git","clone_url":"https://github.com/wolox-training/igc-rails.git","svn_url":"https://github.com/wolox-training/igc-rails","homepage":null,"size":272,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"wolox-training:development","ref":"development","sha":"437e0ed65bdcd29ccbb57961cc4b1cfb1d3cccc3","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"User","site_admin":false},"repo":{"id":42865002,"name":"igc-rails","full_name":"wolox-training/igc-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/igc-rails","description":"Training Ignacio Coluccio","fork":false,"url":"https://api.github.com/repos/wolox-training/igc-rails","forks_url":"https://api.github.com/repos/wolox-training/igc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/igc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/igc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/igc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/igc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/igc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/igc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/igc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/igc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/igc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/igc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/igc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/igc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/igc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/igc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/igc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/igc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/igc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/igc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/igc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/igc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/igc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/igc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/igc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/igc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/igc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/igc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/igc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/igc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/igc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/igc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/igc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/igc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/igc-rails/releases{/id}","created_at":"2015-09-21T12:30:50Z","updated_at":"2015-09-22T12:56:57Z","pushed_at":"2015-09-29T19:33:08Z","git_url":"git://github.com/wolox-training/igc-rails.git","ssh_url":"git@github.com:wolox-training/igc-rails.git","clone_url":"https://github.com/wolox-training/igc-rails.git","svn_url":"https://github.com/wolox-training/igc-rails","homepage":null,"size":272,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11"},"html":{"href":"https://github.com/wolox-training/igc-rails/pull/11"},"issue":{"href":"https://api.github.com/repos/wolox-training/igc-rails/issues/11"},"comments":{"href":"https://api.github.com/repos/wolox-training/igc-rails/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/igc-rails/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/igc-rails/statuses/6bcf3f89a0564f4cf38edc9f09719f927a07dd23"}}}}