{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_62/pulls/comments/32917137","id":32917137,"diff_hunk":"@@ -0,0 +1,54 @@\n+class Admin::CategoriesController < ApplicationController\n+  before_action :set_categories, only: [:show, :edit, :destroy, :update]\n+\n+  def index\n+    @categories = Category.paginate page: params[:page]\n+    @category = Category.new\n+  end\n+\n+  def create\n+    category = Category.new category_params\n+    if category.save\n+      flash[:notice] = t(:create_success, scope: :admin_categories)\n+      redirect_to admin_category_path category\n+    else\n+      flash[:notice] = t(:create_faild, scope: :admin_categories)\n+      redirect_to :back\n+    end\n+  end\n+\n+  def show\n+  end\n+\n+  def edit\n+  end\n+\n+  def update\n+    if @category.update_attributes category_params\n+      flash[:notice] = t(:update_success, scope: :admin_categories)\n+      redirect_to admin_categories_path\n+    else\n+      flash[:notice] = t(:update_faild, scope: :admin_categories)","path":"app/controllers/admin/categories_controller.rb","position":31,"original_position":31,"commit_id":"44d004860bd5546419564e9082ba2eece699b52f","original_commit_id":"44d004860bd5546419564e9082ba2eece699b52f","user":{"login":"khanhkhanh","id":11971311,"avatar_url":"https://avatars.githubusercontent.com/u/11971311?v=3","gravatar_id":"","url":"https://api.github.com/users/khanhkhanh","html_url":"https://github.com/khanhkhanh","followers_url":"https://api.github.com/users/khanhkhanh/followers","following_url":"https://api.github.com/users/khanhkhanh/following{/other_user}","gists_url":"https://api.github.com/users/khanhkhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/khanhkhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khanhkhanh/subscriptions","organizations_url":"https://api.github.com/users/khanhkhanh/orgs","repos_url":"https://api.github.com/users/khanhkhanh/repos","events_url":"https://api.github.com/users/khanhkhanh/events{/privacy}","received_events_url":"https://api.github.com/users/khanhkhanh/received_events","type":"User","site_admin":false},"body":"Remove ()","created_at":"2015-06-22T09:22:33Z","updated_at":"2015-06-22T09:22:33Z","html_url":"https://github.com/framgia/fels_62/pull/8#discussion_r32917137","pull_request_url":"https://api.github.com/repos/framgia/fels_62/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/comments/32917137"},"html":{"href":"https://github.com/framgia/fels_62/pull/8#discussion_r32917137"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_62/pulls/8","id":38196548,"html_url":"https://github.com/framgia/fels_62/pull/8","diff_url":"https://github.com/framgia/fels_62/pull/8.diff","patch_url":"https://github.com/framgia/fels_62/pull/8.patch","issue_url":"https://api.github.com/repos/framgia/fels_62/issues/8","number":8,"state":"open","locked":false,"title":"create admin pages","user":{"login":"PhanThanhGiang91","id":12913887,"avatar_url":"https://avatars.githubusercontent.com/u/12913887?v=3","gravatar_id":"","url":"https://api.github.com/users/PhanThanhGiang91","html_url":"https://github.com/PhanThanhGiang91","followers_url":"https://api.github.com/users/PhanThanhGiang91/followers","following_url":"https://api.github.com/users/PhanThanhGiang91/following{/other_user}","gists_url":"https://api.github.com/users/PhanThanhGiang91/gists{/gist_id}","starred_url":"https://api.github.com/users/PhanThanhGiang91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhanThanhGiang91/subscriptions","organizations_url":"https://api.github.com/users/PhanThanhGiang91/orgs","repos_url":"https://api.github.com/users/PhanThanhGiang91/repos","events_url":"https://api.github.com/users/PhanThanhGiang91/events{/privacy}","received_events_url":"https://api.github.com/users/PhanThanhGiang91/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-22T02:39:20Z","updated_at":"2015-06-22T09:22:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae56c21435fb37cd5dd612f204bf4ee012496ede","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_62/pulls/8/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_62/pulls/8/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_62/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_62/issues/8/comments","statuses_url":"https://api.github.com/repos/framgia/fels_62/statuses/44d004860bd5546419564e9082ba2eece699b52f","head":{"label":"PhanThanhGiang91:admin_function","ref":"admin_function","sha":"44d004860bd5546419564e9082ba2eece699b52f","user":{"login":"PhanThanhGiang91","id":12913887,"avatar_url":"https://avatars.githubusercontent.com/u/12913887?v=3","gravatar_id":"","url":"https://api.github.com/users/PhanThanhGiang91","html_url":"https://github.com/PhanThanhGiang91","followers_url":"https://api.github.com/users/PhanThanhGiang91/followers","following_url":"https://api.github.com/users/PhanThanhGiang91/following{/other_user}","gists_url":"https://api.github.com/users/PhanThanhGiang91/gists{/gist_id}","starred_url":"https://api.github.com/users/PhanThanhGiang91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhanThanhGiang91/subscriptions","organizations_url":"https://api.github.com/users/PhanThanhGiang91/orgs","repos_url":"https://api.github.com/users/PhanThanhGiang91/repos","events_url":"https://api.github.com/users/PhanThanhGiang91/events{/privacy}","received_events_url":"https://api.github.com/users/PhanThanhGiang91/received_events","type":"User","site_admin":false},"repo":{"id":37537781,"name":"fels_62","full_name":"PhanThanhGiang91/fels_62","owner":{"login":"PhanThanhGiang91","id":12913887,"avatar_url":"https://avatars.githubusercontent.com/u/12913887?v=3","gravatar_id":"","url":"https://api.github.com/users/PhanThanhGiang91","html_url":"https://github.com/PhanThanhGiang91","followers_url":"https://api.github.com/users/PhanThanhGiang91/followers","following_url":"https://api.github.com/users/PhanThanhGiang91/following{/other_user}","gists_url":"https://api.github.com/users/PhanThanhGiang91/gists{/gist_id}","starred_url":"https://api.github.com/users/PhanThanhGiang91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhanThanhGiang91/subscriptions","organizations_url":"https://api.github.com/users/PhanThanhGiang91/orgs","repos_url":"https://api.github.com/users/PhanThanhGiang91/repos","events_url":"https://api.github.com/users/PhanThanhGiang91/events{/privacy}","received_events_url":"https://api.github.com/users/PhanThanhGiang91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PhanThanhGiang91/fels_62","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/PhanThanhGiang91/fels_62","forks_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/forks","keys_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/teams","hooks_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/hooks","issue_events_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/issues/events{/number}","events_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/events","assignees_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/assignees{/user}","branches_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/branches{/branch}","tags_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/tags","blobs_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/git/refs{/sha}","trees_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/statuses/{sha}","languages_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/languages","stargazers_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/stargazers","contributors_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/contributors","subscribers_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/subscribers","subscription_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/subscription","commits_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/commits{/sha}","git_commits_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/git/commits{/sha}","comments_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/comments{/number}","issue_comment_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/issues/comments{/number}","contents_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/contents/{+path}","compare_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/merges","archive_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/downloads","issues_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/issues{/number}","pulls_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/pulls{/number}","milestones_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/milestones{/number}","notifications_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/labels{/name}","releases_url":"https://api.github.com/repos/PhanThanhGiang91/fels_62/releases{/id}","created_at":"2015-06-16T15:11:12Z","updated_at":"2015-06-16T10:19:43Z","pushed_at":"2015-06-22T09:06:33Z","git_url":"git://github.com/PhanThanhGiang91/fels_62.git","ssh_url":"git@github.com:PhanThanhGiang91/fels_62.git","clone_url":"https://github.com/PhanThanhGiang91/fels_62.git","svn_url":"https://github.com/PhanThanhGiang91/fels_62","homepage":null,"size":0,"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":"7ddd61f71dc5a34704f6e70a945a21ce50c53edd","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":37523138,"name":"fels_62","full_name":"framgia/fels_62","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_62","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_62","forks_url":"https://api.github.com/repos/framgia/fels_62/forks","keys_url":"https://api.github.com/repos/framgia/fels_62/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_62/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_62/teams","hooks_url":"https://api.github.com/repos/framgia/fels_62/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_62/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_62/events","assignees_url":"https://api.github.com/repos/framgia/fels_62/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_62/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_62/tags","blobs_url":"https://api.github.com/repos/framgia/fels_62/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_62/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_62/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_62/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_62/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_62/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_62/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_62/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_62/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_62/subscription","commits_url":"https://api.github.com/repos/framgia/fels_62/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_62/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_62/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_62/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_62/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_62/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_62/merges","archive_url":"https://api.github.com/repos/framgia/fels_62/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_62/downloads","issues_url":"https://api.github.com/repos/framgia/fels_62/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_62/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_62/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_62/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_62/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_62/releases{/id}","created_at":"2015-06-16T10:19:43Z","updated_at":"2015-06-16T10:19:43Z","pushed_at":"2015-06-22T09:06:34Z","git_url":"git://github.com/framgia/fels_62.git","ssh_url":"git@github.com:framgia/fels_62.git","clone_url":"https://github.com/framgia/fels_62.git","svn_url":"https://github.com/framgia/fels_62","homepage":null,"size":0,"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":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/8"},"html":{"href":"https://github.com/framgia/fels_62/pull/8"},"issue":{"href":"https://api.github.com/repos/framgia/fels_62/issues/8"},"comments":{"href":"https://api.github.com/repos/framgia/fels_62/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_62/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_62/statuses/44d004860bd5546419564e9082ba2eece699b52f"}}}}