{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/manager_library_09/pulls/comments/177751890","pull_request_review_id":107680605,"id":177751890,"diff_hunk":"@@ -0,0 +1,38 @@\n+class CartsController < ApplicationController\n+  before_action :set_cart, except: %i(new index)\n+\n+  def index\n+    @carts = []\n+    if session[:cart_id] != nil\n+      @carts << Cart.find_by_id(session[:cart_id])\n+    end\n+  end\n+\n+  def show; end\n+\n+  def new\n+    @cart = Cart.new\n+  end\n+\n+  def edit; end\n+\n+  def destroy\n+    @cart = current_cart\n+    @cart.destroy\n+    session[:cart_id] = nil\n+    respond_to do |format|\n+      format.html{redirect_to carts_url, notice: t(\".destroy_notice\")}\n+      format.json{head :no_content}\n+    end\n+  end\n+\n+  private\n+\n+  def set_cart\n+    @cart = Cart.find params[:id]","path":"app/controllers/carts_controller.rb","position":null,"original_position":32,"commit_id":"71c9adcc7af38ec7bbe012264601f0564dc3fc67","original_commit_id":"9568f2abc50e45ba173c07e0b5709ebcbff9e6b7","user":{"login":"trinhak","id":36026361,"avatar_url":"https://avatars2.githubusercontent.com/u/36026361?v=4","gravatar_id":"","url":"https://api.github.com/users/trinhak","html_url":"https://github.com/trinhak","followers_url":"https://api.github.com/users/trinhak/followers","following_url":"https://api.github.com/users/trinhak/following{/other_user}","gists_url":"https://api.github.com/users/trinhak/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhak/subscriptions","organizations_url":"https://api.github.com/users/trinhak/orgs","repos_url":"https://api.github.com/users/trinhak/repos","events_url":"https://api.github.com/users/trinhak/events{/privacy}","received_events_url":"https://api.github.com/users/trinhak/received_events","type":"User","site_admin":false},"body":"dạ em sẽ thêm hàm @user || render(file: \"public/404.html\", status: 404, layout: true) vào..khi không tìm thấy thì sẽ chuyển qua trang public/404.html","created_at":"2018-03-28T13:38:39Z","updated_at":"2018-03-28T13:58:42Z","html_url":"https://github.com/framgia/manager_library_09/pull/13#discussion_r177751890","pull_request_url":"https://api.github.com/repos/framgia/manager_library_09/pulls/13","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/comments/177751890"},"html":{"href":"https://github.com/framgia/manager_library_09/pull/13#discussion_r177751890"},"pull_request":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/13"}},"in_reply_to_id":177693768},"pull_request":{"url":"https://api.github.com/repos/framgia/manager_library_09/pulls/13","id":177972135,"html_url":"https://github.com/framgia/manager_library_09/pull/13","diff_url":"https://github.com/framgia/manager_library_09/pull/13.diff","patch_url":"https://github.com/framgia/manager_library_09/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/manager_library_09/issues/13","number":13,"state":"open","locked":false,"title":"Borrow","user":{"login":"trinhak","id":36026361,"avatar_url":"https://avatars2.githubusercontent.com/u/36026361?v=4","gravatar_id":"","url":"https://api.github.com/users/trinhak","html_url":"https://github.com/trinhak","followers_url":"https://api.github.com/users/trinhak/followers","following_url":"https://api.github.com/users/trinhak/following{/other_user}","gists_url":"https://api.github.com/users/trinhak/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhak/subscriptions","organizations_url":"https://api.github.com/users/trinhak/orgs","repos_url":"https://api.github.com/users/trinhak/repos","events_url":"https://api.github.com/users/trinhak/events{/privacy}","received_events_url":"https://api.github.com/users/trinhak/received_events","type":"User","site_admin":false},"body":"![borrow](https://user-images.githubusercontent.com/36026361/38019310-7706001a-32a1-11e8-9a43-5ea7b78772a5.png)\r\n","created_at":"2018-03-28T09:02:54Z","updated_at":"2018-03-28T13:58:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b5c1a2a9c3fb1ed625ad183454b6fe2cf452d1e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/manager_library_09/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/manager_library_09/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/manager_library_09/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/manager_library_09/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/manager_library_09/statuses/71c9adcc7af38ec7bbe012264601f0564dc3fc67","head":{"label":"trinhak:borrow","ref":"borrow","sha":"71c9adcc7af38ec7bbe012264601f0564dc3fc67","user":{"login":"trinhak","id":36026361,"avatar_url":"https://avatars2.githubusercontent.com/u/36026361?v=4","gravatar_id":"","url":"https://api.github.com/users/trinhak","html_url":"https://github.com/trinhak","followers_url":"https://api.github.com/users/trinhak/followers","following_url":"https://api.github.com/users/trinhak/following{/other_user}","gists_url":"https://api.github.com/users/trinhak/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhak/subscriptions","organizations_url":"https://api.github.com/users/trinhak/orgs","repos_url":"https://api.github.com/users/trinhak/repos","events_url":"https://api.github.com/users/trinhak/events{/privacy}","received_events_url":"https://api.github.com/users/trinhak/received_events","type":"User","site_admin":false},"repo":{"id":124860516,"name":"manager_library_09","full_name":"trinhak/manager_library_09","owner":{"login":"trinhak","id":36026361,"avatar_url":"https://avatars2.githubusercontent.com/u/36026361?v=4","gravatar_id":"","url":"https://api.github.com/users/trinhak","html_url":"https://github.com/trinhak","followers_url":"https://api.github.com/users/trinhak/followers","following_url":"https://api.github.com/users/trinhak/following{/other_user}","gists_url":"https://api.github.com/users/trinhak/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhak/subscriptions","organizations_url":"https://api.github.com/users/trinhak/orgs","repos_url":"https://api.github.com/users/trinhak/repos","events_url":"https://api.github.com/users/trinhak/events{/privacy}","received_events_url":"https://api.github.com/users/trinhak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trinhak/manager_library_09","description":null,"fork":true,"url":"https://api.github.com/repos/trinhak/manager_library_09","forks_url":"https://api.github.com/repos/trinhak/manager_library_09/forks","keys_url":"https://api.github.com/repos/trinhak/manager_library_09/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trinhak/manager_library_09/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trinhak/manager_library_09/teams","hooks_url":"https://api.github.com/repos/trinhak/manager_library_09/hooks","issue_events_url":"https://api.github.com/repos/trinhak/manager_library_09/issues/events{/number}","events_url":"https://api.github.com/repos/trinhak/manager_library_09/events","assignees_url":"https://api.github.com/repos/trinhak/manager_library_09/assignees{/user}","branches_url":"https://api.github.com/repos/trinhak/manager_library_09/branches{/branch}","tags_url":"https://api.github.com/repos/trinhak/manager_library_09/tags","blobs_url":"https://api.github.com/repos/trinhak/manager_library_09/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trinhak/manager_library_09/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trinhak/manager_library_09/git/refs{/sha}","trees_url":"https://api.github.com/repos/trinhak/manager_library_09/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trinhak/manager_library_09/statuses/{sha}","languages_url":"https://api.github.com/repos/trinhak/manager_library_09/languages","stargazers_url":"https://api.github.com/repos/trinhak/manager_library_09/stargazers","contributors_url":"https://api.github.com/repos/trinhak/manager_library_09/contributors","subscribers_url":"https://api.github.com/repos/trinhak/manager_library_09/subscribers","subscription_url":"https://api.github.com/repos/trinhak/manager_library_09/subscription","commits_url":"https://api.github.com/repos/trinhak/manager_library_09/commits{/sha}","git_commits_url":"https://api.github.com/repos/trinhak/manager_library_09/git/commits{/sha}","comments_url":"https://api.github.com/repos/trinhak/manager_library_09/comments{/number}","issue_comment_url":"https://api.github.com/repos/trinhak/manager_library_09/issues/comments{/number}","contents_url":"https://api.github.com/repos/trinhak/manager_library_09/contents/{+path}","compare_url":"https://api.github.com/repos/trinhak/manager_library_09/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trinhak/manager_library_09/merges","archive_url":"https://api.github.com/repos/trinhak/manager_library_09/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trinhak/manager_library_09/downloads","issues_url":"https://api.github.com/repos/trinhak/manager_library_09/issues{/number}","pulls_url":"https://api.github.com/repos/trinhak/manager_library_09/pulls{/number}","milestones_url":"https://api.github.com/repos/trinhak/manager_library_09/milestones{/number}","notifications_url":"https://api.github.com/repos/trinhak/manager_library_09/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trinhak/manager_library_09/labels{/name}","releases_url":"https://api.github.com/repos/trinhak/manager_library_09/releases{/id}","deployments_url":"https://api.github.com/repos/trinhak/manager_library_09/deployments","created_at":"2018-03-12T08:54:36Z","updated_at":"2018-03-08T03:41:18Z","pushed_at":"2018-03-28T13:58:27Z","git_url":"git://github.com/trinhak/manager_library_09.git","ssh_url":"git@github.com:trinhak/manager_library_09.git","clone_url":"https://github.com/trinhak/manager_library_09.git","svn_url":"https://github.com/trinhak/manager_library_09","homepage":null,"size":2581,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"framgia:develop","ref":"develop","sha":"407b0cd1505d3c8a6f352ff9bdf29d1a80695a92","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":124332593,"name":"manager_library_09","full_name":"framgia/manager_library_09","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/manager_library_09","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/manager_library_09","forks_url":"https://api.github.com/repos/framgia/manager_library_09/forks","keys_url":"https://api.github.com/repos/framgia/manager_library_09/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/manager_library_09/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/manager_library_09/teams","hooks_url":"https://api.github.com/repos/framgia/manager_library_09/hooks","issue_events_url":"https://api.github.com/repos/framgia/manager_library_09/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/manager_library_09/events","assignees_url":"https://api.github.com/repos/framgia/manager_library_09/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/manager_library_09/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/manager_library_09/tags","blobs_url":"https://api.github.com/repos/framgia/manager_library_09/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/manager_library_09/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/manager_library_09/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/manager_library_09/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/manager_library_09/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/manager_library_09/languages","stargazers_url":"https://api.github.com/repos/framgia/manager_library_09/stargazers","contributors_url":"https://api.github.com/repos/framgia/manager_library_09/contributors","subscribers_url":"https://api.github.com/repos/framgia/manager_library_09/subscribers","subscription_url":"https://api.github.com/repos/framgia/manager_library_09/subscription","commits_url":"https://api.github.com/repos/framgia/manager_library_09/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/manager_library_09/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/manager_library_09/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/manager_library_09/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/manager_library_09/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/manager_library_09/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/manager_library_09/merges","archive_url":"https://api.github.com/repos/framgia/manager_library_09/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/manager_library_09/downloads","issues_url":"https://api.github.com/repos/framgia/manager_library_09/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/manager_library_09/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/manager_library_09/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/manager_library_09/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/manager_library_09/labels{/name}","releases_url":"https://api.github.com/repos/framgia/manager_library_09/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/manager_library_09/deployments","created_at":"2018-03-08T03:41:18Z","updated_at":"2018-03-28T06:23:11Z","pushed_at":"2018-03-28T13:58:29Z","git_url":"git://github.com/framgia/manager_library_09.git","ssh_url":"git@github.com:framgia/manager_library_09.git","clone_url":"https://github.com/framgia/manager_library_09.git","svn_url":"https://github.com/framgia/manager_library_09","homepage":null,"size":2234,"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":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":3,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/13"},"html":{"href":"https://github.com/framgia/manager_library_09/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/manager_library_09/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/manager_library_09/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/manager_library_09/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/manager_library_09/statuses/71c9adcc7af38ec7bbe012264601f0564dc3fc67"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"trinhak"}}