{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_44/pulls/comments/28038116","id":28038116,"diff_hunk":"@@ -0,0 +1,50 @@\n+class Admin::CategoriesController < ApplicationController\n+\n+  def index\n+    @categories = Category.paginate page: params[:page], per_page: 10\n+  end\n+\n+  def new\n+    @category = Category.new\n+  end\n+\n+  def create\n+    @category = Category.new category_params\n+    if @category.save\n+      flash[:message] = \"Category was created successfully...\"\n+    else\n+      flash[:message] = \"Category was created failure...\"\n+    end\n+    redirect_to new_admin_category_path\n+  end\n+\n+  def edit\n+    @category = Category.find params[:id]\n+  end\n+\n+  def update\n+    @category = Category.find params[:id]\n+    if @category.update category_params\n+      flash[:message] = \"Category was updated successfully...\"\n+    else\n+      flash[:message] = \"Category was updated failure...\"\n+    end\n+    redirect_to edit_admin_category_path\n+  end\n+\n+  def destroy\n+    @category = Category.find params[:id]\n+    if @category.destroy\n+      flash[:message] = \"Category was deleted successfully...\"\n+    else\n+      flash[:message] = \"Category was deleted failure...\"\n+    end\n+    redirect_to admin_categories_path\n+  end\n+\n+  private\n+    def category_params","path":"app/controllers/admin/categories_controller.rb","position":46,"original_position":46,"commit_id":"930f50b4a5c7aa729c5ebbb60e6ff56ebbff3c2d","original_commit_id":"2c3b63adf3fe07fb17e863d43f86e1292edc636e","user":{"login":"dieunb","id":2122175,"avatar_url":"https://avatars.githubusercontent.com/u/2122175?v=3","gravatar_id":"","url":"https://api.github.com/users/dieunb","html_url":"https://github.com/dieunb","followers_url":"https://api.github.com/users/dieunb/followers","following_url":"https://api.github.com/users/dieunb/following{/other_user}","gists_url":"https://api.github.com/users/dieunb/gists{/gist_id}","starred_url":"https://api.github.com/users/dieunb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieunb/subscriptions","organizations_url":"https://api.github.com/users/dieunb/orgs","repos_url":"https://api.github.com/users/dieunb/repos","events_url":"https://api.github.com/users/dieunb/events{/privacy}","received_events_url":"https://api.github.com/users/dieunb/received_events","type":"User","site_admin":false},"body":"Anh để lùi vào ngang hàng với private","created_at":"2015-04-09T06:37:06Z","updated_at":"2015-04-09T06:37:06Z","html_url":"https://github.com/framgia/fels_44/pull/3#discussion_r28038116","pull_request_url":"https://api.github.com/repos/framgia/fels_44/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/comments/28038116"},"html":{"href":"https://github.com/framgia/fels_44/pull/3#discussion_r28038116"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_44/pulls/3","id":32571083,"html_url":"https://github.com/framgia/fels_44/pull/3","diff_url":"https://github.com/framgia/fels_44/pull/3.diff","patch_url":"https://github.com/framgia/fels_44/pull/3.patch","issue_url":"https://api.github.com/repos/framgia/fels_44/issues/3","number":3,"state":"open","locked":false,"title":"Make module : Categories & Words","user":{"login":"l3trungkjen","id":9924349,"avatar_url":"https://avatars.githubusercontent.com/u/9924349?v=3","gravatar_id":"","url":"https://api.github.com/users/l3trungkjen","html_url":"https://github.com/l3trungkjen","followers_url":"https://api.github.com/users/l3trungkjen/followers","following_url":"https://api.github.com/users/l3trungkjen/following{/other_user}","gists_url":"https://api.github.com/users/l3trungkjen/gists{/gist_id}","starred_url":"https://api.github.com/users/l3trungkjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l3trungkjen/subscriptions","organizations_url":"https://api.github.com/users/l3trungkjen/orgs","repos_url":"https://api.github.com/users/l3trungkjen/repos","events_url":"https://api.github.com/users/l3trungkjen/events{/privacy}","received_events_url":"https://api.github.com/users/l3trungkjen/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-03T05:40:45Z","updated_at":"2015-04-09T06:37:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9361ffe05bf2f28db79cd660294cbe7b82ed9a0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_44/pulls/3/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_44/pulls/3/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_44/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_44/issues/3/comments","statuses_url":"https://api.github.com/repos/framgia/fels_44/statuses/930f50b4a5c7aa729c5ebbb60e6ff56ebbff3c2d","head":{"label":"l3trungkjen:fels_44_2","ref":"fels_44_2","sha":"930f50b4a5c7aa729c5ebbb60e6ff56ebbff3c2d","user":{"login":"l3trungkjen","id":9924349,"avatar_url":"https://avatars.githubusercontent.com/u/9924349?v=3","gravatar_id":"","url":"https://api.github.com/users/l3trungkjen","html_url":"https://github.com/l3trungkjen","followers_url":"https://api.github.com/users/l3trungkjen/followers","following_url":"https://api.github.com/users/l3trungkjen/following{/other_user}","gists_url":"https://api.github.com/users/l3trungkjen/gists{/gist_id}","starred_url":"https://api.github.com/users/l3trungkjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l3trungkjen/subscriptions","organizations_url":"https://api.github.com/users/l3trungkjen/orgs","repos_url":"https://api.github.com/users/l3trungkjen/repos","events_url":"https://api.github.com/users/l3trungkjen/events{/privacy}","received_events_url":"https://api.github.com/users/l3trungkjen/received_events","type":"User","site_admin":false},"repo":{"id":33177418,"name":"fels_44","full_name":"l3trungkjen/fels_44","owner":{"login":"l3trungkjen","id":9924349,"avatar_url":"https://avatars.githubusercontent.com/u/9924349?v=3","gravatar_id":"","url":"https://api.github.com/users/l3trungkjen","html_url":"https://github.com/l3trungkjen","followers_url":"https://api.github.com/users/l3trungkjen/followers","following_url":"https://api.github.com/users/l3trungkjen/following{/other_user}","gists_url":"https://api.github.com/users/l3trungkjen/gists{/gist_id}","starred_url":"https://api.github.com/users/l3trungkjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l3trungkjen/subscriptions","organizations_url":"https://api.github.com/users/l3trungkjen/orgs","repos_url":"https://api.github.com/users/l3trungkjen/repos","events_url":"https://api.github.com/users/l3trungkjen/events{/privacy}","received_events_url":"https://api.github.com/users/l3trungkjen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/l3trungkjen/fels_44","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/l3trungkjen/fels_44","forks_url":"https://api.github.com/repos/l3trungkjen/fels_44/forks","keys_url":"https://api.github.com/repos/l3trungkjen/fels_44/keys{/key_id}","collaborators_url":"https://api.github.com/repos/l3trungkjen/fels_44/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/l3trungkjen/fels_44/teams","hooks_url":"https://api.github.com/repos/l3trungkjen/fels_44/hooks","issue_events_url":"https://api.github.com/repos/l3trungkjen/fels_44/issues/events{/number}","events_url":"https://api.github.com/repos/l3trungkjen/fels_44/events","assignees_url":"https://api.github.com/repos/l3trungkjen/fels_44/assignees{/user}","branches_url":"https://api.github.com/repos/l3trungkjen/fels_44/branches{/branch}","tags_url":"https://api.github.com/repos/l3trungkjen/fels_44/tags","blobs_url":"https://api.github.com/repos/l3trungkjen/fels_44/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/l3trungkjen/fels_44/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/l3trungkjen/fels_44/git/refs{/sha}","trees_url":"https://api.github.com/repos/l3trungkjen/fels_44/git/trees{/sha}","statuses_url":"https://api.github.com/repos/l3trungkjen/fels_44/statuses/{sha}","languages_url":"https://api.github.com/repos/l3trungkjen/fels_44/languages","stargazers_url":"https://api.github.com/repos/l3trungkjen/fels_44/stargazers","contributors_url":"https://api.github.com/repos/l3trungkjen/fels_44/contributors","subscribers_url":"https://api.github.com/repos/l3trungkjen/fels_44/subscribers","subscription_url":"https://api.github.com/repos/l3trungkjen/fels_44/subscription","commits_url":"https://api.github.com/repos/l3trungkjen/fels_44/commits{/sha}","git_commits_url":"https://api.github.com/repos/l3trungkjen/fels_44/git/commits{/sha}","comments_url":"https://api.github.com/repos/l3trungkjen/fels_44/comments{/number}","issue_comment_url":"https://api.github.com/repos/l3trungkjen/fels_44/issues/comments{/number}","contents_url":"https://api.github.com/repos/l3trungkjen/fels_44/contents/{+path}","compare_url":"https://api.github.com/repos/l3trungkjen/fels_44/compare/{base}...{head}","merges_url":"https://api.github.com/repos/l3trungkjen/fels_44/merges","archive_url":"https://api.github.com/repos/l3trungkjen/fels_44/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/l3trungkjen/fels_44/downloads","issues_url":"https://api.github.com/repos/l3trungkjen/fels_44/issues{/number}","pulls_url":"https://api.github.com/repos/l3trungkjen/fels_44/pulls{/number}","milestones_url":"https://api.github.com/repos/l3trungkjen/fels_44/milestones{/number}","notifications_url":"https://api.github.com/repos/l3trungkjen/fels_44/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/l3trungkjen/fels_44/labels{/name}","releases_url":"https://api.github.com/repos/l3trungkjen/fels_44/releases{/id}","created_at":"2015-03-31T09:41:51Z","updated_at":"2015-02-04T06:27:34Z","pushed_at":"2015-04-09T06:32:23Z","git_url":"git://github.com/l3trungkjen/fels_44.git","ssh_url":"git@github.com:l3trungkjen/fels_44.git","clone_url":"https://github.com/l3trungkjen/fels_44.git","svn_url":"https://github.com/l3trungkjen/fels_44","homepage":null,"size":247,"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":"353c0c459eeed6503bcdf401bfe10b08924a934c","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":30284981,"name":"fels_44","full_name":"framgia/fels_44","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/fels_44","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_44","forks_url":"https://api.github.com/repos/framgia/fels_44/forks","keys_url":"https://api.github.com/repos/framgia/fels_44/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_44/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_44/teams","hooks_url":"https://api.github.com/repos/framgia/fels_44/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_44/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_44/events","assignees_url":"https://api.github.com/repos/framgia/fels_44/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_44/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_44/tags","blobs_url":"https://api.github.com/repos/framgia/fels_44/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_44/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_44/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_44/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_44/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_44/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_44/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_44/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_44/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_44/subscription","commits_url":"https://api.github.com/repos/framgia/fels_44/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_44/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_44/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_44/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_44/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_44/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_44/merges","archive_url":"https://api.github.com/repos/framgia/fels_44/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_44/downloads","issues_url":"https://api.github.com/repos/framgia/fels_44/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_44/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_44/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_44/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_44/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_44/releases{/id}","created_at":"2015-02-04T06:27:34Z","updated_at":"2015-02-04T06:27:34Z","pushed_at":"2015-04-09T06:32:25Z","git_url":"git://github.com/framgia/fels_44.git","ssh_url":"git@github.com:framgia/fels_44.git","clone_url":"https://github.com/framgia/fels_44.git","svn_url":"https://github.com/framgia/fels_44","homepage":null,"size":749,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/3"},"html":{"href":"https://github.com/framgia/fels_44/pull/3"},"issue":{"href":"https://api.github.com/repos/framgia/fels_44/issues/3"},"comments":{"href":"https://api.github.com/repos/framgia/fels_44/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_44/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_44/statuses/930f50b4a5c7aa729c5ebbb60e6ff56ebbff3c2d"}}}}