{"action":"created","comment":{"url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/comments/83851150","pull_request_review_id":4666138,"id":83851150,"diff_hunk":"@@ -0,0 +1,31 @@\n+class MicropostsController < ApplicationController\n+   before_action :logged_in_user, only: [:create, :destroy]\n+   before_action :correct_user, only: :destroy\n+\n+  def create\n+    @micropost = current_user.microposts.build micropost_params\n+    if @micropost.save\n+      flash[:success] = t \".success\"\n+      redirect_to root_url\n+    else\n+      @feed_items = []\n+      render \"static_pages/home\"\n+    end\n+  end\n+\n+  def destroy\n+    @micropost.destroy\n+    flash[:success] = t \".success\"\n+    redirect_to request.referrer || root_url\n+  end\n+  private\n+","path":"app/controllers/microposts_controller.rb","position":22,"original_position":22,"commit_id":"0907a543a61fce687104e2d4f5aa4bb60698fbb9","original_commit_id":"0907a543a61fce687104e2d4f5aa4bb60698fbb9","user":{"login":"nguyenhuutien","id":19922459,"avatar_url":"https://avatars.githubusercontent.com/u/19922459?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenhuutien","html_url":"https://github.com/nguyenhuutien","followers_url":"https://api.github.com/users/nguyenhuutien/followers","following_url":"https://api.github.com/users/nguyenhuutien/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhuutien/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhuutien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhuutien/subscriptions","organizations_url":"https://api.github.com/users/nguyenhuutien/orgs","repos_url":"https://api.github.com/users/nguyenhuutien/repos","events_url":"https://api.github.com/users/nguyenhuutien/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhuutien/received_events","type":"User","site_admin":false},"body":"bỏ cách và để các hàm trong private cùng hàng vs private","created_at":"2016-10-18T13:19:08Z","updated_at":"2016-10-18T13:19:08Z","html_url":"https://github.com/dinhduc0605/sample_app/pull/4#discussion_r83851150","pull_request_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/comments/83851150"},"html":{"href":"https://github.com/dinhduc0605/sample_app/pull/4#discussion_r83851150"},"pull_request":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4","id":89761495,"html_url":"https://github.com/dinhduc0605/sample_app/pull/4","diff_url":"https://github.com/dinhduc0605/sample_app/pull/4.diff","patch_url":"https://github.com/dinhduc0605/sample_app/pull/4.patch","issue_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/4","number":4,"state":"open","locked":false,"title":"User micropost","user":{"login":"dinhduc0605","id":14162340,"avatar_url":"https://avatars.githubusercontent.com/u/14162340?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhduc0605","html_url":"https://github.com/dinhduc0605","followers_url":"https://api.github.com/users/dinhduc0605/followers","following_url":"https://api.github.com/users/dinhduc0605/following{/other_user}","gists_url":"https://api.github.com/users/dinhduc0605/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhduc0605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhduc0605/subscriptions","organizations_url":"https://api.github.com/users/dinhduc0605/orgs","repos_url":"https://api.github.com/users/dinhduc0605/repos","events_url":"https://api.github.com/users/dinhduc0605/events{/privacy}","received_events_url":"https://api.github.com/users/dinhduc0605/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-18T07:39:56Z","updated_at":"2016-10-18T13:22:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bfb4e40bb273dbb5aa8a13c340782158c679fa2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4/commits","review_comments_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4/comments","review_comment_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/4/comments","statuses_url":"https://api.github.com/repos/dinhduc0605/sample_app/statuses/0907a543a61fce687104e2d4f5aa4bb60698fbb9","head":{"label":"dinhduc0605:user-micropost","ref":"user-micropost","sha":"0907a543a61fce687104e2d4f5aa4bb60698fbb9","user":{"login":"dinhduc0605","id":14162340,"avatar_url":"https://avatars.githubusercontent.com/u/14162340?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhduc0605","html_url":"https://github.com/dinhduc0605","followers_url":"https://api.github.com/users/dinhduc0605/followers","following_url":"https://api.github.com/users/dinhduc0605/following{/other_user}","gists_url":"https://api.github.com/users/dinhduc0605/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhduc0605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhduc0605/subscriptions","organizations_url":"https://api.github.com/users/dinhduc0605/orgs","repos_url":"https://api.github.com/users/dinhduc0605/repos","events_url":"https://api.github.com/users/dinhduc0605/events{/privacy}","received_events_url":"https://api.github.com/users/dinhduc0605/received_events","type":"User","site_admin":false},"repo":{"id":69729978,"name":"sample_app","full_name":"dinhduc0605/sample_app","owner":{"login":"dinhduc0605","id":14162340,"avatar_url":"https://avatars.githubusercontent.com/u/14162340?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhduc0605","html_url":"https://github.com/dinhduc0605","followers_url":"https://api.github.com/users/dinhduc0605/followers","following_url":"https://api.github.com/users/dinhduc0605/following{/other_user}","gists_url":"https://api.github.com/users/dinhduc0605/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhduc0605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhduc0605/subscriptions","organizations_url":"https://api.github.com/users/dinhduc0605/orgs","repos_url":"https://api.github.com/users/dinhduc0605/repos","events_url":"https://api.github.com/users/dinhduc0605/events{/privacy}","received_events_url":"https://api.github.com/users/dinhduc0605/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dinhduc0605/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/dinhduc0605/sample_app","forks_url":"https://api.github.com/repos/dinhduc0605/sample_app/forks","keys_url":"https://api.github.com/repos/dinhduc0605/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dinhduc0605/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dinhduc0605/sample_app/teams","hooks_url":"https://api.github.com/repos/dinhduc0605/sample_app/hooks","issue_events_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/dinhduc0605/sample_app/events","assignees_url":"https://api.github.com/repos/dinhduc0605/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/dinhduc0605/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/dinhduc0605/sample_app/tags","blobs_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dinhduc0605/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/dinhduc0605/sample_app/languages","stargazers_url":"https://api.github.com/repos/dinhduc0605/sample_app/stargazers","contributors_url":"https://api.github.com/repos/dinhduc0605/sample_app/contributors","subscribers_url":"https://api.github.com/repos/dinhduc0605/sample_app/subscribers","subscription_url":"https://api.github.com/repos/dinhduc0605/sample_app/subscription","commits_url":"https://api.github.com/repos/dinhduc0605/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/dinhduc0605/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/dinhduc0605/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/dinhduc0605/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dinhduc0605/sample_app/merges","archive_url":"https://api.github.com/repos/dinhduc0605/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dinhduc0605/sample_app/downloads","issues_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/dinhduc0605/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/dinhduc0605/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dinhduc0605/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/dinhduc0605/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/dinhduc0605/sample_app/deployments","created_at":"2016-10-01T09:24:12Z","updated_at":"2016-10-01T09:25:13Z","pushed_at":"2016-10-18T12:58:41Z","git_url":"git://github.com/dinhduc0605/sample_app.git","ssh_url":"git@github.com:dinhduc0605/sample_app.git","clone_url":"https://github.com/dinhduc0605/sample_app.git","svn_url":"https://github.com/dinhduc0605/sample_app","homepage":null,"size":88,"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":"dinhduc0605:master","ref":"master","sha":"7d9742da920d96e45ef0423cc053865b4f40373f","user":{"login":"dinhduc0605","id":14162340,"avatar_url":"https://avatars.githubusercontent.com/u/14162340?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhduc0605","html_url":"https://github.com/dinhduc0605","followers_url":"https://api.github.com/users/dinhduc0605/followers","following_url":"https://api.github.com/users/dinhduc0605/following{/other_user}","gists_url":"https://api.github.com/users/dinhduc0605/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhduc0605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhduc0605/subscriptions","organizations_url":"https://api.github.com/users/dinhduc0605/orgs","repos_url":"https://api.github.com/users/dinhduc0605/repos","events_url":"https://api.github.com/users/dinhduc0605/events{/privacy}","received_events_url":"https://api.github.com/users/dinhduc0605/received_events","type":"User","site_admin":false},"repo":{"id":69729978,"name":"sample_app","full_name":"dinhduc0605/sample_app","owner":{"login":"dinhduc0605","id":14162340,"avatar_url":"https://avatars.githubusercontent.com/u/14162340?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhduc0605","html_url":"https://github.com/dinhduc0605","followers_url":"https://api.github.com/users/dinhduc0605/followers","following_url":"https://api.github.com/users/dinhduc0605/following{/other_user}","gists_url":"https://api.github.com/users/dinhduc0605/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhduc0605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhduc0605/subscriptions","organizations_url":"https://api.github.com/users/dinhduc0605/orgs","repos_url":"https://api.github.com/users/dinhduc0605/repos","events_url":"https://api.github.com/users/dinhduc0605/events{/privacy}","received_events_url":"https://api.github.com/users/dinhduc0605/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dinhduc0605/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/dinhduc0605/sample_app","forks_url":"https://api.github.com/repos/dinhduc0605/sample_app/forks","keys_url":"https://api.github.com/repos/dinhduc0605/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dinhduc0605/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dinhduc0605/sample_app/teams","hooks_url":"https://api.github.com/repos/dinhduc0605/sample_app/hooks","issue_events_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/dinhduc0605/sample_app/events","assignees_url":"https://api.github.com/repos/dinhduc0605/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/dinhduc0605/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/dinhduc0605/sample_app/tags","blobs_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dinhduc0605/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/dinhduc0605/sample_app/languages","stargazers_url":"https://api.github.com/repos/dinhduc0605/sample_app/stargazers","contributors_url":"https://api.github.com/repos/dinhduc0605/sample_app/contributors","subscribers_url":"https://api.github.com/repos/dinhduc0605/sample_app/subscribers","subscription_url":"https://api.github.com/repos/dinhduc0605/sample_app/subscription","commits_url":"https://api.github.com/repos/dinhduc0605/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/dinhduc0605/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/dinhduc0605/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/dinhduc0605/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/dinhduc0605/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dinhduc0605/sample_app/merges","archive_url":"https://api.github.com/repos/dinhduc0605/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dinhduc0605/sample_app/downloads","issues_url":"https://api.github.com/repos/dinhduc0605/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/dinhduc0605/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/dinhduc0605/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/dinhduc0605/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dinhduc0605/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/dinhduc0605/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/dinhduc0605/sample_app/deployments","created_at":"2016-10-01T09:24:12Z","updated_at":"2016-10-01T09:25:13Z","pushed_at":"2016-10-18T12:58:41Z","git_url":"git://github.com/dinhduc0605/sample_app.git","ssh_url":"git@github.com:dinhduc0605/sample_app.git","clone_url":"https://github.com/dinhduc0605/sample_app.git","svn_url":"https://github.com/dinhduc0605/sample_app","homepage":null,"size":88,"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/dinhduc0605/sample_app/pulls/4"},"html":{"href":"https://github.com/dinhduc0605/sample_app/pull/4"},"issue":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/issues/4"},"comments":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/dinhduc0605/sample_app/statuses/0907a543a61fce687104e2d4f5aa4bb60698fbb9"}}}}
{"actor":{"display_login":"nguyenhuutien"}}