{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_140/pulls/comments/66395125","id":66395125,"diff_hunk":"@@ -1,7 +1,38 @@\n class Admin::UsersController < ApplicationController\n   before_action :logged_in_user, :verify_user\n+  before_action :set_user, except: [:index, :destroy]\n \n   def index\n     @users = User.paginate page: params[:page]\n   end\n+\n+  def show\n+  end\n+\n+  def edit\n+  end\n+\n+  def update\n+    if @user.update_attributes user_params\n+      flash[:success] = t \"notice.profile_update\"\n+      redirect_to admin_user_path @user\n+    else\n+      render :edit\n+    end\n+  end\n+\n+  def destroy\n+    User.find(params[:id]).destroy\n+    flash[:success] = t \"notice.delete_success\"\n+    redirect_to admin_users_path\n+  end\n+\n+  private\n+  def user_params\n+    params.require(:user).permit :name, :email, :password, :password_confirmation, :avatar\n+  end\n+\n+  def set_user\n+    @user = User.find_by id: params[:id]\n+  end","path":"app/controllers/admin/users_controller.rb","position":37,"original_position":37,"commit_id":"f8eb149144eeace85ab69e9b8c9c2499560cc521","original_commit_id":"f8eb149144eeace85ab69e9b8c9c2499560cc521","user":{"login":"nhs3108","id":10093701,"avatar_url":"https://avatars.githubusercontent.com/u/10093701?v=3","gravatar_id":"","url":"https://api.github.com/users/nhs3108","html_url":"https://github.com/nhs3108","followers_url":"https://api.github.com/users/nhs3108/followers","following_url":"https://api.github.com/users/nhs3108/following{/other_user}","gists_url":"https://api.github.com/users/nhs3108/gists{/gist_id}","starred_url":"https://api.github.com/users/nhs3108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhs3108/subscriptions","organizations_url":"https://api.github.com/users/nhs3108/orgs","repos_url":"https://api.github.com/users/nhs3108/repos","events_url":"https://api.github.com/users/nhs3108/events{/privacy}","received_events_url":"https://api.github.com/users/nhs3108/received_events","type":"User","site_admin":false},"body":"vớ lại find thực tế là nó đã bị deprecate rồi ạ","created_at":"2016-06-09T07:39:50Z","updated_at":"2016-06-09T07:39:50Z","html_url":"https://github.com/framgia/fels_140/pull/6#discussion_r66395125","pull_request_url":"https://api.github.com/repos/framgia/fels_140/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/comments/66395125"},"html":{"href":"https://github.com/framgia/fels_140/pull/6#discussion_r66395125"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_140/pulls/6","id":73160926,"html_url":"https://github.com/framgia/fels_140/pull/6","diff_url":"https://github.com/framgia/fels_140/pull/6.diff","patch_url":"https://github.com/framgia/fels_140/pull/6.patch","issue_url":"https://api.github.com/repos/framgia/fels_140/issues/6","number":6,"state":"open","locked":false,"title":"Edit and show","user":{"login":"linhtn","id":6815074,"avatar_url":"https://avatars.githubusercontent.com/u/6815074?v=3","gravatar_id":"","url":"https://api.github.com/users/linhtn","html_url":"https://github.com/linhtn","followers_url":"https://api.github.com/users/linhtn/followers","following_url":"https://api.github.com/users/linhtn/following{/other_user}","gists_url":"https://api.github.com/users/linhtn/gists{/gist_id}","starred_url":"https://api.github.com/users/linhtn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhtn/subscriptions","organizations_url":"https://api.github.com/users/linhtn/orgs","repos_url":"https://api.github.com/users/linhtn/repos","events_url":"https://api.github.com/users/linhtn/events{/privacy}","received_events_url":"https://api.github.com/users/linhtn/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-09T05:57:37Z","updated_at":"2016-06-09T07:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc5b7d198d80a4773bf9307da680eff4dc71103a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_140/pulls/6/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_140/pulls/6/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_140/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_140/issues/6/comments","statuses_url":"https://api.github.com/repos/framgia/fels_140/statuses/f8eb149144eeace85ab69e9b8c9c2499560cc521","head":{"label":"linhtn:64572-Edit-and-show-user","ref":"64572-Edit-and-show-user","sha":"f8eb149144eeace85ab69e9b8c9c2499560cc521","user":{"login":"linhtn","id":6815074,"avatar_url":"https://avatars.githubusercontent.com/u/6815074?v=3","gravatar_id":"","url":"https://api.github.com/users/linhtn","html_url":"https://github.com/linhtn","followers_url":"https://api.github.com/users/linhtn/followers","following_url":"https://api.github.com/users/linhtn/following{/other_user}","gists_url":"https://api.github.com/users/linhtn/gists{/gist_id}","starred_url":"https://api.github.com/users/linhtn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhtn/subscriptions","organizations_url":"https://api.github.com/users/linhtn/orgs","repos_url":"https://api.github.com/users/linhtn/repos","events_url":"https://api.github.com/users/linhtn/events{/privacy}","received_events_url":"https://api.github.com/users/linhtn/received_events","type":"User","site_admin":false},"repo":{"id":60325692,"name":"fels_140","full_name":"linhtn/fels_140","owner":{"login":"linhtn","id":6815074,"avatar_url":"https://avatars.githubusercontent.com/u/6815074?v=3","gravatar_id":"","url":"https://api.github.com/users/linhtn","html_url":"https://github.com/linhtn","followers_url":"https://api.github.com/users/linhtn/followers","following_url":"https://api.github.com/users/linhtn/following{/other_user}","gists_url":"https://api.github.com/users/linhtn/gists{/gist_id}","starred_url":"https://api.github.com/users/linhtn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhtn/subscriptions","organizations_url":"https://api.github.com/users/linhtn/orgs","repos_url":"https://api.github.com/users/linhtn/repos","events_url":"https://api.github.com/users/linhtn/events{/privacy}","received_events_url":"https://api.github.com/users/linhtn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/linhtn/fels_140","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/linhtn/fels_140","forks_url":"https://api.github.com/repos/linhtn/fels_140/forks","keys_url":"https://api.github.com/repos/linhtn/fels_140/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linhtn/fels_140/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linhtn/fels_140/teams","hooks_url":"https://api.github.com/repos/linhtn/fels_140/hooks","issue_events_url":"https://api.github.com/repos/linhtn/fels_140/issues/events{/number}","events_url":"https://api.github.com/repos/linhtn/fels_140/events","assignees_url":"https://api.github.com/repos/linhtn/fels_140/assignees{/user}","branches_url":"https://api.github.com/repos/linhtn/fels_140/branches{/branch}","tags_url":"https://api.github.com/repos/linhtn/fels_140/tags","blobs_url":"https://api.github.com/repos/linhtn/fels_140/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linhtn/fels_140/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linhtn/fels_140/git/refs{/sha}","trees_url":"https://api.github.com/repos/linhtn/fels_140/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linhtn/fels_140/statuses/{sha}","languages_url":"https://api.github.com/repos/linhtn/fels_140/languages","stargazers_url":"https://api.github.com/repos/linhtn/fels_140/stargazers","contributors_url":"https://api.github.com/repos/linhtn/fels_140/contributors","subscribers_url":"https://api.github.com/repos/linhtn/fels_140/subscribers","subscription_url":"https://api.github.com/repos/linhtn/fels_140/subscription","commits_url":"https://api.github.com/repos/linhtn/fels_140/commits{/sha}","git_commits_url":"https://api.github.com/repos/linhtn/fels_140/git/commits{/sha}","comments_url":"https://api.github.com/repos/linhtn/fels_140/comments{/number}","issue_comment_url":"https://api.github.com/repos/linhtn/fels_140/issues/comments{/number}","contents_url":"https://api.github.com/repos/linhtn/fels_140/contents/{+path}","compare_url":"https://api.github.com/repos/linhtn/fels_140/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linhtn/fels_140/merges","archive_url":"https://api.github.com/repos/linhtn/fels_140/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linhtn/fels_140/downloads","issues_url":"https://api.github.com/repos/linhtn/fels_140/issues{/number}","pulls_url":"https://api.github.com/repos/linhtn/fels_140/pulls{/number}","milestones_url":"https://api.github.com/repos/linhtn/fels_140/milestones{/number}","notifications_url":"https://api.github.com/repos/linhtn/fels_140/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linhtn/fels_140/labels{/name}","releases_url":"https://api.github.com/repos/linhtn/fels_140/releases{/id}","deployments_url":"https://api.github.com/repos/linhtn/fels_140/deployments","created_at":"2016-06-03T06:58:32Z","updated_at":"2016-05-31T02:44:15Z","pushed_at":"2016-06-09T07:04:01Z","git_url":"git://github.com/linhtn/fels_140.git","ssh_url":"git@github.com:linhtn/fels_140.git","clone_url":"https://github.com/linhtn/fels_140.git","svn_url":"https://github.com/linhtn/fels_140","homepage":null,"size":52,"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":"7cb442151616a81b993289a13bdd8eaf5fe9f65b","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":60053127,"name":"fels_140","full_name":"framgia/fels_140","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_140","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_140","forks_url":"https://api.github.com/repos/framgia/fels_140/forks","keys_url":"https://api.github.com/repos/framgia/fels_140/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_140/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_140/teams","hooks_url":"https://api.github.com/repos/framgia/fels_140/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_140/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_140/events","assignees_url":"https://api.github.com/repos/framgia/fels_140/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_140/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_140/tags","blobs_url":"https://api.github.com/repos/framgia/fels_140/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_140/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_140/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_140/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_140/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_140/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_140/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_140/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_140/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_140/subscription","commits_url":"https://api.github.com/repos/framgia/fels_140/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_140/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_140/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_140/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_140/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_140/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_140/merges","archive_url":"https://api.github.com/repos/framgia/fels_140/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_140/downloads","issues_url":"https://api.github.com/repos/framgia/fels_140/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_140/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_140/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_140/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_140/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_140/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_140/deployments","created_at":"2016-05-31T02:44:15Z","updated_at":"2016-05-31T02:44:15Z","pushed_at":"2016-06-09T07:04:02Z","git_url":"git://github.com/framgia/fels_140.git","ssh_url":"git@github.com:framgia/fels_140.git","clone_url":"https://github.com/framgia/fels_140.git","svn_url":"https://github.com/framgia/fels_140","homepage":null,"size":50,"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":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/6"},"html":{"href":"https://github.com/framgia/fels_140/pull/6"},"issue":{"href":"https://api.github.com/repos/framgia/fels_140/issues/6"},"comments":{"href":"https://api.github.com/repos/framgia/fels_140/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_140/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_140/statuses/f8eb149144eeace85ab69e9b8c9c2499560cc521"}}}}
{"actor":{"display_login":"nhs3108"}}