{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fdf_16/pulls/comments/82108447","pull_request_review_id":3038308,"id":82108447,"diff_hunk":"@@ -0,0 +1,37 @@\n+class CategoriesController < ApplicationController\n+  \n+  def index\n+    @categories = Category.paginate page: params[:page] \n+  end\n+\n+  def create\n+    @category = Product.recent.paginate page: params[:page], per_page: Settings.per_page\n+    if @category.save\n+      flash[:success] = t \"category.create\"\n+    else\n+      flash[:danger] = t \"category.fail\"\n+    end\n+    redirect_to categories_path \n+  end\n+\n+  def destroy\n+    @category = Category.find_by id: params[:id]\n+    if @category.nil?\n+      flash[:danger] = t \"category.no_found\"\n+      redirect_to root_path\n+    else\n+      @category.destroy\n+      flash[:success] = t \"category.destroy\"\n+      redirect_to categories_path\n+    end\n+  end\n+\n+  def new","path":"app/controllers/categories_controller.rb","position":29,"original_position":29,"commit_id":"7046d6f160cc8ab3dc73f8a90d23d02cdbacce73","original_commit_id":"7046d6f160cc8ab3dc73f8a90d23d02cdbacce73","user":{"login":"hellovietnam93","id":8023606,"avatar_url":"https://avatars.githubusercontent.com/u/8023606?v=3","gravatar_id":"","url":"https://api.github.com/users/hellovietnam93","html_url":"https://github.com/hellovietnam93","followers_url":"https://api.github.com/users/hellovietnam93/followers","following_url":"https://api.github.com/users/hellovietnam93/following{/other_user}","gists_url":"https://api.github.com/users/hellovietnam93/gists{/gist_id}","starred_url":"https://api.github.com/users/hellovietnam93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellovietnam93/subscriptions","organizations_url":"https://api.github.com/users/hellovietnam93/orgs","repos_url":"https://api.github.com/users/hellovietnam93/repos","events_url":"https://api.github.com/users/hellovietnam93/events{/privacy}","received_events_url":"https://api.github.com/users/hellovietnam93/received_events","type":"User","site_admin":false},"body":"em sắp xếp lại thứu tự vị trí các function nhé, nó theo thứ tự cả đấy","created_at":"2016-10-06T02:35:04Z","updated_at":"2016-10-06T02:35:19Z","html_url":"https://github.com/framgia/fdf_16/pull/25#discussion_r82108447","pull_request_url":"https://api.github.com/repos/framgia/fdf_16/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/comments/82108447"},"html":{"href":"https://github.com/framgia/fdf_16/pull/25#discussion_r82108447"},"pull_request":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fdf_16/pulls/25","id":88080825,"html_url":"https://github.com/framgia/fdf_16/pull/25","diff_url":"https://github.com/framgia/fdf_16/pull/25.diff","patch_url":"https://github.com/framgia/fdf_16/pull/25.patch","issue_url":"https://api.github.com/repos/framgia/fdf_16/issues/25","number":25,"state":"open","locked":false,"title":"finish product and category","user":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-05T13:46:14Z","updated_at":"2016-10-06T02:36:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f70c1cbe023b5c7804386e7fedc610aaa2fd730","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fdf_16/pulls/25/commits","review_comments_url":"https://api.github.com/repos/framgia/fdf_16/pulls/25/comments","review_comment_url":"https://api.github.com/repos/framgia/fdf_16/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fdf_16/issues/25/comments","statuses_url":"https://api.github.com/repos/framgia/fdf_16/statuses/7046d6f160cc8ab3dc73f8a90d23d02cdbacce73","head":{"label":"tamnguyenxuan25:user2","ref":"user2","sha":"7046d6f160cc8ab3dc73f8a90d23d02cdbacce73","user":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"repo":{"id":69651156,"name":"fdf_16","full_name":"tamnguyenxuan25/fdf_16","owner":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tamnguyenxuan25/fdf_16","description":"Foods & Drinks (training)","fork":true,"url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16","forks_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/forks","keys_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/teams","hooks_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/hooks","issue_events_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues/events{/number}","events_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/events","assignees_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/assignees{/user}","branches_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/branches{/branch}","tags_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/tags","blobs_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/statuses/{sha}","languages_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/languages","stargazers_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/stargazers","contributors_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/contributors","subscribers_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/subscribers","subscription_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/subscription","commits_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/contents/{+path}","compare_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/merges","archive_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/downloads","issues_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues{/number}","pulls_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/pulls{/number}","milestones_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/milestones{/number}","notifications_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/labels{/name}","releases_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/releases{/id}","deployments_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/deployments","created_at":"2016-09-30T08:58:46Z","updated_at":"2016-09-27T09:05:11Z","pushed_at":"2016-10-06T01:29:18Z","git_url":"git://github.com/tamnguyenxuan25/fdf_16.git","ssh_url":"git@github.com:tamnguyenxuan25/fdf_16.git","clone_url":"https://github.com/tamnguyenxuan25/fdf_16.git","svn_url":"https://github.com/tamnguyenxuan25/fdf_16","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"ec53a0e67c2ce50f3ccabee01f52014ce9c99055","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","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":69338690,"name":"fdf_16","full_name":"framgia/fdf_16","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","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/fdf_16","description":"Foods & Drinks (training)","fork":false,"url":"https://api.github.com/repos/framgia/fdf_16","forks_url":"https://api.github.com/repos/framgia/fdf_16/forks","keys_url":"https://api.github.com/repos/framgia/fdf_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fdf_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fdf_16/teams","hooks_url":"https://api.github.com/repos/framgia/fdf_16/hooks","issue_events_url":"https://api.github.com/repos/framgia/fdf_16/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fdf_16/events","assignees_url":"https://api.github.com/repos/framgia/fdf_16/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fdf_16/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fdf_16/tags","blobs_url":"https://api.github.com/repos/framgia/fdf_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fdf_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fdf_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fdf_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fdf_16/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fdf_16/languages","stargazers_url":"https://api.github.com/repos/framgia/fdf_16/stargazers","contributors_url":"https://api.github.com/repos/framgia/fdf_16/contributors","subscribers_url":"https://api.github.com/repos/framgia/fdf_16/subscribers","subscription_url":"https://api.github.com/repos/framgia/fdf_16/subscription","commits_url":"https://api.github.com/repos/framgia/fdf_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fdf_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fdf_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fdf_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fdf_16/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fdf_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fdf_16/merges","archive_url":"https://api.github.com/repos/framgia/fdf_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fdf_16/downloads","issues_url":"https://api.github.com/repos/framgia/fdf_16/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fdf_16/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fdf_16/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fdf_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fdf_16/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fdf_16/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fdf_16/deployments","created_at":"2016-09-27T09:05:11Z","updated_at":"2016-09-27T09:05:11Z","pushed_at":"2016-10-06T01:29:19Z","git_url":"git://github.com/framgia/fdf_16.git","ssh_url":"git@github.com:framgia/fdf_16.git","clone_url":"https://github.com/framgia/fdf_16.git","svn_url":"https://github.com/framgia/fdf_16","homepage":null,"size":77,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/25"},"html":{"href":"https://github.com/framgia/fdf_16/pull/25"},"issue":{"href":"https://api.github.com/repos/framgia/fdf_16/issues/25"},"comments":{"href":"https://api.github.com/repos/framgia/fdf_16/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fdf_16/statuses/7046d6f160cc8ab3dc73f8a90d23d02cdbacce73"}}}}
{"actor":{"display_login":"hellovietnam93"}}