{"action":"created","comment":{"url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/comments/167472367","pull_request_review_id":95694274,"id":167472367,"diff_hunk":"@@ -0,0 +1,33 @@\n+class RelationshipsController < ApplicationController\n+  before_action :logged_in_user\n+\n+  def create\n+    @user = User.find_by id: params[:followed_id]\n+    current_user.follow user\n+    after_follow user\n+  end\n+\n+  def destroy\n+    @user = Relationship.find_by(id: params[:id]).followed\n+    current_user.unfollow user\n+    after_unfollow user\n+  end\n+\n+  private\n+\n+  attr_reader :user\n+\n+  def after_follow user\n+    respond_to do |format|\n+      format.html{redirect_to user}\n+      format.js\n+    end\n+  end\n+\n+  def after_unfollow user","path":"app/controllers/relationships_controller.rb","position":27,"original_position":27,"commit_id":"5aa8f3804acd463f15e8c586869bc92ecd258a33","original_commit_id":"5aa8f3804acd463f15e8c586869bc92ecd258a33","user":{"login":"DuongNT1512","id":20291773,"avatar_url":"https://avatars1.githubusercontent.com/u/20291773?v=4","gravatar_id":"","url":"https://api.github.com/users/DuongNT1512","html_url":"https://github.com/DuongNT1512","followers_url":"https://api.github.com/users/DuongNT1512/followers","following_url":"https://api.github.com/users/DuongNT1512/following{/other_user}","gists_url":"https://api.github.com/users/DuongNT1512/gists{/gist_id}","starred_url":"https://api.github.com/users/DuongNT1512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuongNT1512/subscriptions","organizations_url":"https://api.github.com/users/DuongNT1512/orgs","repos_url":"https://api.github.com/users/DuongNT1512/repos","events_url":"https://api.github.com/users/DuongNT1512/events{/privacy}","received_events_url":"https://api.github.com/users/DuongNT1512/received_events","type":"User","site_admin":false},"body":"2 hàm này giống nhau mà?","created_at":"2018-02-12T05:53:50Z","updated_at":"2018-02-12T05:53:50Z","html_url":"https://github.com/BeYourShine/ProjectOne/pull/14#discussion_r167472367","pull_request_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/comments/167472367"},"html":{"href":"https://github.com/BeYourShine/ProjectOne/pull/14#discussion_r167472367"},"pull_request":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14","id":168443007,"html_url":"https://github.com/BeYourShine/ProjectOne/pull/14","diff_url":"https://github.com/BeYourShine/ProjectOne/pull/14.diff","patch_url":"https://github.com/BeYourShine/ProjectOne/pull/14.patch","issue_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/14","number":14,"state":"open","locked":false,"title":"Task/chapter14","user":{"login":"BeYourShine","id":29447497,"avatar_url":"https://avatars2.githubusercontent.com/u/29447497?v=4","gravatar_id":"","url":"https://api.github.com/users/BeYourShine","html_url":"https://github.com/BeYourShine","followers_url":"https://api.github.com/users/BeYourShine/followers","following_url":"https://api.github.com/users/BeYourShine/following{/other_user}","gists_url":"https://api.github.com/users/BeYourShine/gists{/gist_id}","starred_url":"https://api.github.com/users/BeYourShine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BeYourShine/subscriptions","organizations_url":"https://api.github.com/users/BeYourShine/orgs","repos_url":"https://api.github.com/users/BeYourShine/repos","events_url":"https://api.github.com/users/BeYourShine/events{/privacy}","received_events_url":"https://api.github.com/users/BeYourShine/received_events","type":"User","site_admin":false},"body":"self review done","created_at":"2018-02-11T08:36:21Z","updated_at":"2018-02-12T05:53:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05b0eec6e539fe81c7b697210c81af1c8b8c0551","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14/commits","review_comments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14/comments","review_comment_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/14/comments","statuses_url":"https://api.github.com/repos/BeYourShine/ProjectOne/statuses/5aa8f3804acd463f15e8c586869bc92ecd258a33","head":{"label":"BeYourShine:task/chapter14","ref":"task/chapter14","sha":"5aa8f3804acd463f15e8c586869bc92ecd258a33","user":{"login":"BeYourShine","id":29447497,"avatar_url":"https://avatars2.githubusercontent.com/u/29447497?v=4","gravatar_id":"","url":"https://api.github.com/users/BeYourShine","html_url":"https://github.com/BeYourShine","followers_url":"https://api.github.com/users/BeYourShine/followers","following_url":"https://api.github.com/users/BeYourShine/following{/other_user}","gists_url":"https://api.github.com/users/BeYourShine/gists{/gist_id}","starred_url":"https://api.github.com/users/BeYourShine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BeYourShine/subscriptions","organizations_url":"https://api.github.com/users/BeYourShine/orgs","repos_url":"https://api.github.com/users/BeYourShine/repos","events_url":"https://api.github.com/users/BeYourShine/events{/privacy}","received_events_url":"https://api.github.com/users/BeYourShine/received_events","type":"User","site_admin":false},"repo":{"id":115687378,"name":"ProjectOne","full_name":"BeYourShine/ProjectOne","owner":{"login":"BeYourShine","id":29447497,"avatar_url":"https://avatars2.githubusercontent.com/u/29447497?v=4","gravatar_id":"","url":"https://api.github.com/users/BeYourShine","html_url":"https://github.com/BeYourShine","followers_url":"https://api.github.com/users/BeYourShine/followers","following_url":"https://api.github.com/users/BeYourShine/following{/other_user}","gists_url":"https://api.github.com/users/BeYourShine/gists{/gist_id}","starred_url":"https://api.github.com/users/BeYourShine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BeYourShine/subscriptions","organizations_url":"https://api.github.com/users/BeYourShine/orgs","repos_url":"https://api.github.com/users/BeYourShine/repos","events_url":"https://api.github.com/users/BeYourShine/events{/privacy}","received_events_url":"https://api.github.com/users/BeYourShine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BeYourShine/ProjectOne","description":null,"fork":false,"url":"https://api.github.com/repos/BeYourShine/ProjectOne","forks_url":"https://api.github.com/repos/BeYourShine/ProjectOne/forks","keys_url":"https://api.github.com/repos/BeYourShine/ProjectOne/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BeYourShine/ProjectOne/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BeYourShine/ProjectOne/teams","hooks_url":"https://api.github.com/repos/BeYourShine/ProjectOne/hooks","issue_events_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/events{/number}","events_url":"https://api.github.com/repos/BeYourShine/ProjectOne/events","assignees_url":"https://api.github.com/repos/BeYourShine/ProjectOne/assignees{/user}","branches_url":"https://api.github.com/repos/BeYourShine/ProjectOne/branches{/branch}","tags_url":"https://api.github.com/repos/BeYourShine/ProjectOne/tags","blobs_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/refs{/sha}","trees_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BeYourShine/ProjectOne/statuses/{sha}","languages_url":"https://api.github.com/repos/BeYourShine/ProjectOne/languages","stargazers_url":"https://api.github.com/repos/BeYourShine/ProjectOne/stargazers","contributors_url":"https://api.github.com/repos/BeYourShine/ProjectOne/contributors","subscribers_url":"https://api.github.com/repos/BeYourShine/ProjectOne/subscribers","subscription_url":"https://api.github.com/repos/BeYourShine/ProjectOne/subscription","commits_url":"https://api.github.com/repos/BeYourShine/ProjectOne/commits{/sha}","git_commits_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/commits{/sha}","comments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/comments{/number}","issue_comment_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/comments{/number}","contents_url":"https://api.github.com/repos/BeYourShine/ProjectOne/contents/{+path}","compare_url":"https://api.github.com/repos/BeYourShine/ProjectOne/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BeYourShine/ProjectOne/merges","archive_url":"https://api.github.com/repos/BeYourShine/ProjectOne/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BeYourShine/ProjectOne/downloads","issues_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues{/number}","pulls_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls{/number}","milestones_url":"https://api.github.com/repos/BeYourShine/ProjectOne/milestones{/number}","notifications_url":"https://api.github.com/repos/BeYourShine/ProjectOne/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BeYourShine/ProjectOne/labels{/name}","releases_url":"https://api.github.com/repos/BeYourShine/ProjectOne/releases{/id}","deployments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/deployments","created_at":"2017-12-29T04:44:44Z","updated_at":"2018-01-03T15:26:23Z","pushed_at":"2018-02-12T05:49:44Z","git_url":"git://github.com/BeYourShine/ProjectOne.git","ssh_url":"git@github.com:BeYourShine/ProjectOne.git","clone_url":"https://github.com/BeYourShine/ProjectOne.git","svn_url":"https://github.com/BeYourShine/ProjectOne","homepage":null,"size":393,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"BeYourShine:master","ref":"master","sha":"bd23990b64825a3f9d201c370b058262f382b0f0","user":{"login":"BeYourShine","id":29447497,"avatar_url":"https://avatars2.githubusercontent.com/u/29447497?v=4","gravatar_id":"","url":"https://api.github.com/users/BeYourShine","html_url":"https://github.com/BeYourShine","followers_url":"https://api.github.com/users/BeYourShine/followers","following_url":"https://api.github.com/users/BeYourShine/following{/other_user}","gists_url":"https://api.github.com/users/BeYourShine/gists{/gist_id}","starred_url":"https://api.github.com/users/BeYourShine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BeYourShine/subscriptions","organizations_url":"https://api.github.com/users/BeYourShine/orgs","repos_url":"https://api.github.com/users/BeYourShine/repos","events_url":"https://api.github.com/users/BeYourShine/events{/privacy}","received_events_url":"https://api.github.com/users/BeYourShine/received_events","type":"User","site_admin":false},"repo":{"id":115687378,"name":"ProjectOne","full_name":"BeYourShine/ProjectOne","owner":{"login":"BeYourShine","id":29447497,"avatar_url":"https://avatars2.githubusercontent.com/u/29447497?v=4","gravatar_id":"","url":"https://api.github.com/users/BeYourShine","html_url":"https://github.com/BeYourShine","followers_url":"https://api.github.com/users/BeYourShine/followers","following_url":"https://api.github.com/users/BeYourShine/following{/other_user}","gists_url":"https://api.github.com/users/BeYourShine/gists{/gist_id}","starred_url":"https://api.github.com/users/BeYourShine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BeYourShine/subscriptions","organizations_url":"https://api.github.com/users/BeYourShine/orgs","repos_url":"https://api.github.com/users/BeYourShine/repos","events_url":"https://api.github.com/users/BeYourShine/events{/privacy}","received_events_url":"https://api.github.com/users/BeYourShine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BeYourShine/ProjectOne","description":null,"fork":false,"url":"https://api.github.com/repos/BeYourShine/ProjectOne","forks_url":"https://api.github.com/repos/BeYourShine/ProjectOne/forks","keys_url":"https://api.github.com/repos/BeYourShine/ProjectOne/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BeYourShine/ProjectOne/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BeYourShine/ProjectOne/teams","hooks_url":"https://api.github.com/repos/BeYourShine/ProjectOne/hooks","issue_events_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/events{/number}","events_url":"https://api.github.com/repos/BeYourShine/ProjectOne/events","assignees_url":"https://api.github.com/repos/BeYourShine/ProjectOne/assignees{/user}","branches_url":"https://api.github.com/repos/BeYourShine/ProjectOne/branches{/branch}","tags_url":"https://api.github.com/repos/BeYourShine/ProjectOne/tags","blobs_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/refs{/sha}","trees_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BeYourShine/ProjectOne/statuses/{sha}","languages_url":"https://api.github.com/repos/BeYourShine/ProjectOne/languages","stargazers_url":"https://api.github.com/repos/BeYourShine/ProjectOne/stargazers","contributors_url":"https://api.github.com/repos/BeYourShine/ProjectOne/contributors","subscribers_url":"https://api.github.com/repos/BeYourShine/ProjectOne/subscribers","subscription_url":"https://api.github.com/repos/BeYourShine/ProjectOne/subscription","commits_url":"https://api.github.com/repos/BeYourShine/ProjectOne/commits{/sha}","git_commits_url":"https://api.github.com/repos/BeYourShine/ProjectOne/git/commits{/sha}","comments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/comments{/number}","issue_comment_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/comments{/number}","contents_url":"https://api.github.com/repos/BeYourShine/ProjectOne/contents/{+path}","compare_url":"https://api.github.com/repos/BeYourShine/ProjectOne/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BeYourShine/ProjectOne/merges","archive_url":"https://api.github.com/repos/BeYourShine/ProjectOne/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BeYourShine/ProjectOne/downloads","issues_url":"https://api.github.com/repos/BeYourShine/ProjectOne/issues{/number}","pulls_url":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls{/number}","milestones_url":"https://api.github.com/repos/BeYourShine/ProjectOne/milestones{/number}","notifications_url":"https://api.github.com/repos/BeYourShine/ProjectOne/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BeYourShine/ProjectOne/labels{/name}","releases_url":"https://api.github.com/repos/BeYourShine/ProjectOne/releases{/id}","deployments_url":"https://api.github.com/repos/BeYourShine/ProjectOne/deployments","created_at":"2017-12-29T04:44:44Z","updated_at":"2018-01-03T15:26:23Z","pushed_at":"2018-02-12T05:49:44Z","git_url":"git://github.com/BeYourShine/ProjectOne.git","ssh_url":"git@github.com:BeYourShine/ProjectOne.git","clone_url":"https://github.com/BeYourShine/ProjectOne.git","svn_url":"https://github.com/BeYourShine/ProjectOne","homepage":null,"size":393,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14"},"html":{"href":"https://github.com/BeYourShine/ProjectOne/pull/14"},"issue":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/14"},"comments":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/BeYourShine/ProjectOne/statuses/5aa8f3804acd463f15e8c586869bc92ecd258a33"}},"author_association":"OWNER"}}
{"actor":{"display_login":"DuongNT1512"}}