{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_145/pulls/comments/68169151","id":68169151,"diff_hunk":"@@ -25,16 +27,30 @@ def edit\n \n   def update\n     @category = Category.find params[:id]\n+  end\n+\n+  def update\n     if @category.update_attributes category_params\n       flash[:success] = t \"controllers.categories.updated\"\n-      redirect_to root_url\n+      redirect_to categories_url\n     else\n       render :edit\n     end\n   end\n \n+   def destroy\n+    Category.find_by(id: params[:id]).destroy\n+    flash[:success] = t \"views.categories.delete_category\"\n+    redirect_to categories_url\n+  end\n+\n   private\n+","path":"app/controllers/categories_controller.rb","position":41,"original_position":41,"commit_id":"ba69f32c8fa82bf3db19485929137ebab06f9f57","original_commit_id":"ba69f32c8fa82bf3db19485929137ebab06f9f57","user":{"login":"dogiadat","id":11146493,"avatar_url":"https://avatars.githubusercontent.com/u/11146493?v=3","gravatar_id":"","url":"https://api.github.com/users/dogiadat","html_url":"https://github.com/dogiadat","followers_url":"https://api.github.com/users/dogiadat/followers","following_url":"https://api.github.com/users/dogiadat/following{/other_user}","gists_url":"https://api.github.com/users/dogiadat/gists{/gist_id}","starred_url":"https://api.github.com/users/dogiadat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogiadat/subscriptions","organizations_url":"https://api.github.com/users/dogiadat/orgs","repos_url":"https://api.github.com/users/dogiadat/repos","events_url":"https://api.github.com/users/dogiadat/events{/privacy}","received_events_url":"https://api.github.com/users/dogiadat/received_events","type":"User","site_admin":false},"body":"chị xóa cái này đi","created_at":"2016-06-23T02:56:46Z","updated_at":"2016-06-23T02:56:46Z","html_url":"https://github.com/framgia/fels_145/pull/13#discussion_r68169151","pull_request_url":"https://api.github.com/repos/framgia/fels_145/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/comments/68169151"},"html":{"href":"https://github.com/framgia/fels_145/pull/13#discussion_r68169151"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_145/pulls/13","id":74888958,"html_url":"https://github.com/framgia/fels_145/pull/13","diff_url":"https://github.com/framgia/fels_145/pull/13.diff","patch_url":"https://github.com/framgia/fels_145/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/fels_145/issues/13","number":13,"state":"open","locked":false,"title":"Task9 delete category","user":{"login":"HoangLanh","id":16830494,"avatar_url":"https://avatars.githubusercontent.com/u/16830494?v=3","gravatar_id":"","url":"https://api.github.com/users/HoangLanh","html_url":"https://github.com/HoangLanh","followers_url":"https://api.github.com/users/HoangLanh/followers","following_url":"https://api.github.com/users/HoangLanh/following{/other_user}","gists_url":"https://api.github.com/users/HoangLanh/gists{/gist_id}","starred_url":"https://api.github.com/users/HoangLanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoangLanh/subscriptions","organizations_url":"https://api.github.com/users/HoangLanh/orgs","repos_url":"https://api.github.com/users/HoangLanh/repos","events_url":"https://api.github.com/users/HoangLanh/events{/privacy}","received_events_url":"https://api.github.com/users/HoangLanh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-23T02:53:34Z","updated_at":"2016-06-23T02:56:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"616d02f4f05587fb52dbfba2e28cc21c51bb2e1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_145/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_145/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_145/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_145/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/fels_145/statuses/ba69f32c8fa82bf3db19485929137ebab06f9f57","head":{"label":"HoangLanh:task9-Delete_Category","ref":"task9-Delete_Category","sha":"ba69f32c8fa82bf3db19485929137ebab06f9f57","user":{"login":"HoangLanh","id":16830494,"avatar_url":"https://avatars.githubusercontent.com/u/16830494?v=3","gravatar_id":"","url":"https://api.github.com/users/HoangLanh","html_url":"https://github.com/HoangLanh","followers_url":"https://api.github.com/users/HoangLanh/followers","following_url":"https://api.github.com/users/HoangLanh/following{/other_user}","gists_url":"https://api.github.com/users/HoangLanh/gists{/gist_id}","starred_url":"https://api.github.com/users/HoangLanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoangLanh/subscriptions","organizations_url":"https://api.github.com/users/HoangLanh/orgs","repos_url":"https://api.github.com/users/HoangLanh/repos","events_url":"https://api.github.com/users/HoangLanh/events{/privacy}","received_events_url":"https://api.github.com/users/HoangLanh/received_events","type":"User","site_admin":false},"repo":{"id":61535514,"name":"fels_145","full_name":"HoangLanh/fels_145","owner":{"login":"HoangLanh","id":16830494,"avatar_url":"https://avatars.githubusercontent.com/u/16830494?v=3","gravatar_id":"","url":"https://api.github.com/users/HoangLanh","html_url":"https://github.com/HoangLanh","followers_url":"https://api.github.com/users/HoangLanh/followers","following_url":"https://api.github.com/users/HoangLanh/following{/other_user}","gists_url":"https://api.github.com/users/HoangLanh/gists{/gist_id}","starred_url":"https://api.github.com/users/HoangLanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoangLanh/subscriptions","organizations_url":"https://api.github.com/users/HoangLanh/orgs","repos_url":"https://api.github.com/users/HoangLanh/repos","events_url":"https://api.github.com/users/HoangLanh/events{/privacy}","received_events_url":"https://api.github.com/users/HoangLanh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HoangLanh/fels_145","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/HoangLanh/fels_145","forks_url":"https://api.github.com/repos/HoangLanh/fels_145/forks","keys_url":"https://api.github.com/repos/HoangLanh/fels_145/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HoangLanh/fels_145/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HoangLanh/fels_145/teams","hooks_url":"https://api.github.com/repos/HoangLanh/fels_145/hooks","issue_events_url":"https://api.github.com/repos/HoangLanh/fels_145/issues/events{/number}","events_url":"https://api.github.com/repos/HoangLanh/fels_145/events","assignees_url":"https://api.github.com/repos/HoangLanh/fels_145/assignees{/user}","branches_url":"https://api.github.com/repos/HoangLanh/fels_145/branches{/branch}","tags_url":"https://api.github.com/repos/HoangLanh/fels_145/tags","blobs_url":"https://api.github.com/repos/HoangLanh/fels_145/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HoangLanh/fels_145/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HoangLanh/fels_145/git/refs{/sha}","trees_url":"https://api.github.com/repos/HoangLanh/fels_145/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HoangLanh/fels_145/statuses/{sha}","languages_url":"https://api.github.com/repos/HoangLanh/fels_145/languages","stargazers_url":"https://api.github.com/repos/HoangLanh/fels_145/stargazers","contributors_url":"https://api.github.com/repos/HoangLanh/fels_145/contributors","subscribers_url":"https://api.github.com/repos/HoangLanh/fels_145/subscribers","subscription_url":"https://api.github.com/repos/HoangLanh/fels_145/subscription","commits_url":"https://api.github.com/repos/HoangLanh/fels_145/commits{/sha}","git_commits_url":"https://api.github.com/repos/HoangLanh/fels_145/git/commits{/sha}","comments_url":"https://api.github.com/repos/HoangLanh/fels_145/comments{/number}","issue_comment_url":"https://api.github.com/repos/HoangLanh/fels_145/issues/comments{/number}","contents_url":"https://api.github.com/repos/HoangLanh/fels_145/contents/{+path}","compare_url":"https://api.github.com/repos/HoangLanh/fels_145/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HoangLanh/fels_145/merges","archive_url":"https://api.github.com/repos/HoangLanh/fels_145/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HoangLanh/fels_145/downloads","issues_url":"https://api.github.com/repos/HoangLanh/fels_145/issues{/number}","pulls_url":"https://api.github.com/repos/HoangLanh/fels_145/pulls{/number}","milestones_url":"https://api.github.com/repos/HoangLanh/fels_145/milestones{/number}","notifications_url":"https://api.github.com/repos/HoangLanh/fels_145/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HoangLanh/fels_145/labels{/name}","releases_url":"https://api.github.com/repos/HoangLanh/fels_145/releases{/id}","deployments_url":"https://api.github.com/repos/HoangLanh/fels_145/deployments","created_at":"2016-06-20T09:40:38Z","updated_at":"2016-06-20T05:52:43Z","pushed_at":"2016-06-23T02:52:10Z","git_url":"git://github.com/HoangLanh/fels_145.git","ssh_url":"git@github.com:HoangLanh/fels_145.git","clone_url":"https://github.com/HoangLanh/fels_145.git","svn_url":"https://github.com/HoangLanh/fels_145","homepage":null,"size":43,"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":"c1f9ebc6195850805a53f92bfbf2e1b542e0cef1","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":61520302,"name":"fels_145","full_name":"framgia/fels_145","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_145","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_145","forks_url":"https://api.github.com/repos/framgia/fels_145/forks","keys_url":"https://api.github.com/repos/framgia/fels_145/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_145/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_145/teams","hooks_url":"https://api.github.com/repos/framgia/fels_145/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_145/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_145/events","assignees_url":"https://api.github.com/repos/framgia/fels_145/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_145/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_145/tags","blobs_url":"https://api.github.com/repos/framgia/fels_145/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_145/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_145/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_145/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_145/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_145/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_145/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_145/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_145/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_145/subscription","commits_url":"https://api.github.com/repos/framgia/fels_145/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_145/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_145/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_145/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_145/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_145/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_145/merges","archive_url":"https://api.github.com/repos/framgia/fels_145/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_145/downloads","issues_url":"https://api.github.com/repos/framgia/fels_145/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_145/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_145/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_145/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_145/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_145/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_145/deployments","created_at":"2016-06-20T05:52:43Z","updated_at":"2016-06-20T05:52:43Z","pushed_at":"2016-06-23T02:53:34Z","git_url":"git://github.com/framgia/fels_145.git","ssh_url":"git@github.com:framgia/fels_145.git","clone_url":"https://github.com/framgia/fels_145.git","svn_url":"https://github.com/framgia/fels_145","homepage":null,"size":46,"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":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/13"},"html":{"href":"https://github.com/framgia/fels_145/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/fels_145/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/fels_145/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_145/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_145/statuses/ba69f32c8fa82bf3db19485929137ebab06f9f57"}}}}
{"actor":{"display_login":"dogiadat"}}