{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_24/pulls/comments/29641255","id":29641255,"diff_hunk":"@@ -3,10 +3,16 @@ class ApplicationController < ActionController::Base\n   # For APIs, you may want to use :null_session instead.\n   protect_from_forgery with: :exception\n   before_action :configure_permitted_parameters, if: :devise_controller?\n+  before_action :authenticate_user!\n+  before_filter :set_current_user","path":"app/controllers/application_controller.rb","position":5,"original_position":5,"commit_id":"95fb9adb383e38c36fa1b77835de3e3911f542ac","original_commit_id":"95fb9adb383e38c36fa1b77835de3e3911f542ac","user":{"login":"nguyenduyta","id":11607910,"avatar_url":"https://avatars.githubusercontent.com/u/11607910?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenduyta","html_url":"https://github.com/nguyenduyta","followers_url":"https://api.github.com/users/nguyenduyta/followers","following_url":"https://api.github.com/users/nguyenduyta/following{/other_user}","gists_url":"https://api.github.com/users/nguyenduyta/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenduyta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenduyta/subscriptions","organizations_url":"https://api.github.com/users/nguyenduyta/orgs","repos_url":"https://api.github.com/users/nguyenduyta/repos","events_url":"https://api.github.com/users/nguyenduyta/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenduyta/received_events","type":"User","site_admin":false},"body":"chuyển before_filter thành before_action anh ạ. Nó là 1. before_filter là cách viết cũ","created_at":"2015-05-05T02:49:09Z","updated_at":"2015-05-05T02:49:09Z","html_url":"https://github.com/framgia/tms_24/pull/5#discussion_r29641255","pull_request_url":"https://api.github.com/repos/framgia/tms_24/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/comments/29641255"},"html":{"href":"https://github.com/framgia/tms_24/pull/5#discussion_r29641255"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_24/pulls/5","id":34336235,"html_url":"https://github.com/framgia/tms_24/pull/5","diff_url":"https://github.com/framgia/tms_24/pull/5.diff","patch_url":"https://github.com/framgia/tms_24/pull/5.patch","issue_url":"https://api.github.com/repos/framgia/tms_24/issues/5","number":5,"state":"open","locked":false,"title":"Make Subjects & Tasks","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-29T06:29:03Z","updated_at":"2015-05-05T02:49:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10f814b07b443aa3db4b6974e959933f0cc4342d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_24/pulls/5/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_24/pulls/5/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_24/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/tms_24/issues/5/comments","statuses_url":"https://api.github.com/repos/framgia/tms_24/statuses/95fb9adb383e38c36fa1b77835de3e3911f542ac","head":{"label":"l3trungkjen:user_tasks","ref":"user_tasks","sha":"95fb9adb383e38c36fa1b77835de3e3911f542ac","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":34373340,"name":"tms_24","full_name":"l3trungkjen/tms_24","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/tms_24","description":"Framgia Training Management System","fork":true,"url":"https://api.github.com/repos/l3trungkjen/tms_24","forks_url":"https://api.github.com/repos/l3trungkjen/tms_24/forks","keys_url":"https://api.github.com/repos/l3trungkjen/tms_24/keys{/key_id}","collaborators_url":"https://api.github.com/repos/l3trungkjen/tms_24/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/l3trungkjen/tms_24/teams","hooks_url":"https://api.github.com/repos/l3trungkjen/tms_24/hooks","issue_events_url":"https://api.github.com/repos/l3trungkjen/tms_24/issues/events{/number}","events_url":"https://api.github.com/repos/l3trungkjen/tms_24/events","assignees_url":"https://api.github.com/repos/l3trungkjen/tms_24/assignees{/user}","branches_url":"https://api.github.com/repos/l3trungkjen/tms_24/branches{/branch}","tags_url":"https://api.github.com/repos/l3trungkjen/tms_24/tags","blobs_url":"https://api.github.com/repos/l3trungkjen/tms_24/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/l3trungkjen/tms_24/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/l3trungkjen/tms_24/git/refs{/sha}","trees_url":"https://api.github.com/repos/l3trungkjen/tms_24/git/trees{/sha}","statuses_url":"https://api.github.com/repos/l3trungkjen/tms_24/statuses/{sha}","languages_url":"https://api.github.com/repos/l3trungkjen/tms_24/languages","stargazers_url":"https://api.github.com/repos/l3trungkjen/tms_24/stargazers","contributors_url":"https://api.github.com/repos/l3trungkjen/tms_24/contributors","subscribers_url":"https://api.github.com/repos/l3trungkjen/tms_24/subscribers","subscription_url":"https://api.github.com/repos/l3trungkjen/tms_24/subscription","commits_url":"https://api.github.com/repos/l3trungkjen/tms_24/commits{/sha}","git_commits_url":"https://api.github.com/repos/l3trungkjen/tms_24/git/commits{/sha}","comments_url":"https://api.github.com/repos/l3trungkjen/tms_24/comments{/number}","issue_comment_url":"https://api.github.com/repos/l3trungkjen/tms_24/issues/comments{/number}","contents_url":"https://api.github.com/repos/l3trungkjen/tms_24/contents/{+path}","compare_url":"https://api.github.com/repos/l3trungkjen/tms_24/compare/{base}...{head}","merges_url":"https://api.github.com/repos/l3trungkjen/tms_24/merges","archive_url":"https://api.github.com/repos/l3trungkjen/tms_24/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/l3trungkjen/tms_24/downloads","issues_url":"https://api.github.com/repos/l3trungkjen/tms_24/issues{/number}","pulls_url":"https://api.github.com/repos/l3trungkjen/tms_24/pulls{/number}","milestones_url":"https://api.github.com/repos/l3trungkjen/tms_24/milestones{/number}","notifications_url":"https://api.github.com/repos/l3trungkjen/tms_24/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/l3trungkjen/tms_24/labels{/name}","releases_url":"https://api.github.com/repos/l3trungkjen/tms_24/releases{/id}","created_at":"2015-04-22T06:35:43Z","updated_at":"2015-04-15T03:17:34Z","pushed_at":"2015-05-05T02:43:31Z","git_url":"git://github.com/l3trungkjen/tms_24.git","ssh_url":"git@github.com:l3trungkjen/tms_24.git","clone_url":"https://github.com/l3trungkjen/tms_24.git","svn_url":"https://github.com/l3trungkjen/tms_24","homepage":null,"size":173,"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":"0288d4aa4fda9472681c7c20c05d6136644b69cf","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":33970687,"name":"tms_24","full_name":"framgia/tms_24","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/tms_24","description":"Framgia Training Management System","fork":false,"url":"https://api.github.com/repos/framgia/tms_24","forks_url":"https://api.github.com/repos/framgia/tms_24/forks","keys_url":"https://api.github.com/repos/framgia/tms_24/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_24/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_24/teams","hooks_url":"https://api.github.com/repos/framgia/tms_24/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_24/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_24/events","assignees_url":"https://api.github.com/repos/framgia/tms_24/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_24/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_24/tags","blobs_url":"https://api.github.com/repos/framgia/tms_24/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_24/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_24/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_24/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_24/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_24/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_24/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_24/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_24/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_24/subscription","commits_url":"https://api.github.com/repos/framgia/tms_24/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_24/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_24/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_24/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/tms_24/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_24/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_24/merges","archive_url":"https://api.github.com/repos/framgia/tms_24/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_24/downloads","issues_url":"https://api.github.com/repos/framgia/tms_24/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_24/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_24/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_24/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_24/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_24/releases{/id}","created_at":"2015-04-15T03:17:34Z","updated_at":"2015-04-15T03:17:34Z","pushed_at":"2015-05-05T02:43:31Z","git_url":"git://github.com/framgia/tms_24.git","ssh_url":"git@github.com:framgia/tms_24.git","clone_url":"https://github.com/framgia/tms_24.git","svn_url":"https://github.com/framgia/tms_24","homepage":null,"size":275,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/5"},"html":{"href":"https://github.com/framgia/tms_24/pull/5"},"issue":{"href":"https://api.github.com/repos/framgia/tms_24/issues/5"},"comments":{"href":"https://api.github.com/repos/framgia/tms_24/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_24/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_24/statuses/95fb9adb383e38c36fa1b77835de3e3911f542ac"}}}}