{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fts_30/pulls/comments/31010149","id":31010149,"diff_hunk":"@@ -0,0 +1,31 @@\n+class UsersController < ApplicationController\n+  before_filter :authenticate_user!\n+  \n+  def index\n+    @users = User.all\n+    @users = User.paginate page: params[:page], per_page: 10\n+  end\n+\n+  def show\n+    @user = User.find params[:id]\n+    unless @user == current_user\n+      redirect_to :back, alert: \"Access denied.\"\n+    end\n+  end\n+\n+  def update\n+    @user = User.find params[:id]\n+    if @user.update_attributes secure_params\n+      redirect_to users_path, notice: \"User updated.\"\n+    else\n+      redirect_to users_path, alert: \"Unable to update user.\"\n+    end\n+  end\n+\n+  def destroy\n+    user = User.find params[:id]\n+    user.destroy\n+    redirect_to users_path, notice: \"User deleted.\"","path":"app/controllers/users_controller.rb","position":28,"original_position":28,"commit_id":"67255bd5de14c2d17de581e43b3e2676c52f7a19","original_commit_id":"67255bd5de14c2d17de581e43b3e2676c52f7a19","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":"Sử dụng i18n để update String","created_at":"2015-05-26T07:37:52Z","updated_at":"2015-05-26T07:37:52Z","html_url":"https://github.com/framgia/fts_30/pull/3#discussion_r31010149","pull_request_url":"https://api.github.com/repos/framgia/fts_30/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/framgia/fts_30/pulls/comments/31010149"},"html":{"href":"https://github.com/framgia/fts_30/pull/3#discussion_r31010149"},"pull_request":{"href":"https://api.github.com/repos/framgia/fts_30/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fts_30/pulls/3","id":36171899,"html_url":"https://github.com/framgia/fts_30/pull/3","diff_url":"https://github.com/framgia/fts_30/pull/3.diff","patch_url":"https://github.com/framgia/fts_30/pull/3.patch","issue_url":"https://api.github.com/repos/framgia/fts_30/issues/3","number":3,"state":"open","locked":false,"title":"View for user","user":{"login":"dcthanh","id":6041815,"avatar_url":"https://avatars.githubusercontent.com/u/6041815?v=3","gravatar_id":"","url":"https://api.github.com/users/dcthanh","html_url":"https://github.com/dcthanh","followers_url":"https://api.github.com/users/dcthanh/followers","following_url":"https://api.github.com/users/dcthanh/following{/other_user}","gists_url":"https://api.github.com/users/dcthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dcthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcthanh/subscriptions","organizations_url":"https://api.github.com/users/dcthanh/orgs","repos_url":"https://api.github.com/users/dcthanh/repos","events_url":"https://api.github.com/users/dcthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dcthanh/received_events","type":"User","site_admin":false},"body":"View for user ","created_at":"2015-05-26T06:06:21Z","updated_at":"2015-05-26T07:37:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"836424e75d3add3bf2c4351ec715cf49a088d363","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fts_30/pulls/3/commits","review_comments_url":"https://api.github.com/repos/framgia/fts_30/pulls/3/comments","review_comment_url":"https://api.github.com/repos/framgia/fts_30/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fts_30/issues/3/comments","statuses_url":"https://api.github.com/repos/framgia/fts_30/statuses/67255bd5de14c2d17de581e43b3e2676c52f7a19","head":{"label":"dcthanh:user_view","ref":"user_view","sha":"67255bd5de14c2d17de581e43b3e2676c52f7a19","user":{"login":"dcthanh","id":6041815,"avatar_url":"https://avatars.githubusercontent.com/u/6041815?v=3","gravatar_id":"","url":"https://api.github.com/users/dcthanh","html_url":"https://github.com/dcthanh","followers_url":"https://api.github.com/users/dcthanh/followers","following_url":"https://api.github.com/users/dcthanh/following{/other_user}","gists_url":"https://api.github.com/users/dcthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dcthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcthanh/subscriptions","organizations_url":"https://api.github.com/users/dcthanh/orgs","repos_url":"https://api.github.com/users/dcthanh/repos","events_url":"https://api.github.com/users/dcthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dcthanh/received_events","type":"User","site_admin":false},"repo":{"id":36216827,"name":"fts_30","full_name":"dcthanh/fts_30","owner":{"login":"dcthanh","id":6041815,"avatar_url":"https://avatars.githubusercontent.com/u/6041815?v=3","gravatar_id":"","url":"https://api.github.com/users/dcthanh","html_url":"https://github.com/dcthanh","followers_url":"https://api.github.com/users/dcthanh/followers","following_url":"https://api.github.com/users/dcthanh/following{/other_user}","gists_url":"https://api.github.com/users/dcthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dcthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcthanh/subscriptions","organizations_url":"https://api.github.com/users/dcthanh/orgs","repos_url":"https://api.github.com/users/dcthanh/repos","events_url":"https://api.github.com/users/dcthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dcthanh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcthanh/fts_30","description":"Framgia Test System (training)","fork":true,"url":"https://api.github.com/repos/dcthanh/fts_30","forks_url":"https://api.github.com/repos/dcthanh/fts_30/forks","keys_url":"https://api.github.com/repos/dcthanh/fts_30/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcthanh/fts_30/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcthanh/fts_30/teams","hooks_url":"https://api.github.com/repos/dcthanh/fts_30/hooks","issue_events_url":"https://api.github.com/repos/dcthanh/fts_30/issues/events{/number}","events_url":"https://api.github.com/repos/dcthanh/fts_30/events","assignees_url":"https://api.github.com/repos/dcthanh/fts_30/assignees{/user}","branches_url":"https://api.github.com/repos/dcthanh/fts_30/branches{/branch}","tags_url":"https://api.github.com/repos/dcthanh/fts_30/tags","blobs_url":"https://api.github.com/repos/dcthanh/fts_30/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcthanh/fts_30/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcthanh/fts_30/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcthanh/fts_30/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcthanh/fts_30/statuses/{sha}","languages_url":"https://api.github.com/repos/dcthanh/fts_30/languages","stargazers_url":"https://api.github.com/repos/dcthanh/fts_30/stargazers","contributors_url":"https://api.github.com/repos/dcthanh/fts_30/contributors","subscribers_url":"https://api.github.com/repos/dcthanh/fts_30/subscribers","subscription_url":"https://api.github.com/repos/dcthanh/fts_30/subscription","commits_url":"https://api.github.com/repos/dcthanh/fts_30/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcthanh/fts_30/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcthanh/fts_30/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcthanh/fts_30/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcthanh/fts_30/contents/{+path}","compare_url":"https://api.github.com/repos/dcthanh/fts_30/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcthanh/fts_30/merges","archive_url":"https://api.github.com/repos/dcthanh/fts_30/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcthanh/fts_30/downloads","issues_url":"https://api.github.com/repos/dcthanh/fts_30/issues{/number}","pulls_url":"https://api.github.com/repos/dcthanh/fts_30/pulls{/number}","milestones_url":"https://api.github.com/repos/dcthanh/fts_30/milestones{/number}","notifications_url":"https://api.github.com/repos/dcthanh/fts_30/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcthanh/fts_30/labels{/name}","releases_url":"https://api.github.com/repos/dcthanh/fts_30/releases{/id}","created_at":"2015-05-25T07:30:34Z","updated_at":"2015-05-25T06:17:12Z","pushed_at":"2015-05-26T06:05:17Z","git_url":"git://github.com/dcthanh/fts_30.git","ssh_url":"git@github.com:dcthanh/fts_30.git","clone_url":"https://github.com/dcthanh/fts_30.git","svn_url":"https://github.com/dcthanh/fts_30","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":"1d280bfbcaf1ee89e76560294e35b1e0ae239f5d","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":36213626,"name":"fts_30","full_name":"framgia/fts_30","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/fts_30","description":"Framgia Test System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fts_30","forks_url":"https://api.github.com/repos/framgia/fts_30/forks","keys_url":"https://api.github.com/repos/framgia/fts_30/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fts_30/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fts_30/teams","hooks_url":"https://api.github.com/repos/framgia/fts_30/hooks","issue_events_url":"https://api.github.com/repos/framgia/fts_30/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fts_30/events","assignees_url":"https://api.github.com/repos/framgia/fts_30/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fts_30/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fts_30/tags","blobs_url":"https://api.github.com/repos/framgia/fts_30/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fts_30/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fts_30/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fts_30/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fts_30/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fts_30/languages","stargazers_url":"https://api.github.com/repos/framgia/fts_30/stargazers","contributors_url":"https://api.github.com/repos/framgia/fts_30/contributors","subscribers_url":"https://api.github.com/repos/framgia/fts_30/subscribers","subscription_url":"https://api.github.com/repos/framgia/fts_30/subscription","commits_url":"https://api.github.com/repos/framgia/fts_30/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fts_30/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fts_30/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fts_30/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fts_30/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fts_30/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fts_30/merges","archive_url":"https://api.github.com/repos/framgia/fts_30/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fts_30/downloads","issues_url":"https://api.github.com/repos/framgia/fts_30/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fts_30/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fts_30/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fts_30/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fts_30/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fts_30/releases{/id}","created_at":"2015-05-25T06:17:12Z","updated_at":"2015-05-25T06:17:12Z","pushed_at":"2015-05-26T07:31:04Z","git_url":"git://github.com/framgia/fts_30.git","ssh_url":"git@github.com:framgia/fts_30.git","clone_url":"https://github.com/framgia/fts_30.git","svn_url":"https://github.com/framgia/fts_30","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/fts_30/pulls/3"},"html":{"href":"https://github.com/framgia/fts_30/pull/3"},"issue":{"href":"https://api.github.com/repos/framgia/fts_30/issues/3"},"comments":{"href":"https://api.github.com/repos/framgia/fts_30/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fts_30/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fts_30/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fts_30/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fts_30/statuses/67255bd5de14c2d17de581e43b3e2676c52f7a19"}}}}