{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_9/pulls/comments/23989576","id":23989576,"diff_hunk":"@@ -37,4 +37,17 @@ def log_out\n     session.delete :user_id\n     @current_user = nil\n   end\n+\n+  def current_user?(user)\n+    user == current_user\n+  end\n+\n+  def redirect_back_or(default)\n+    redirect_to(session[:forwarding_url] || default)\n+    session.delete(:forwarding_url)","path":"app/helpers/sessions_helper.rb","position":11,"original_position":11,"commit_id":"0d008e8c87540f0ecf9febfa1436f8bb665949a3","original_commit_id":"0d008e8c87540f0ecf9febfa1436f8bb665949a3","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":"remove ()","created_at":"2015-02-03T08:46:30Z","updated_at":"2015-02-03T08:46:30Z","html_url":"https://github.com/framgia/tms_9/pull/13#discussion_r23989576","pull_request_url":"https://api.github.com/repos/framgia/tms_9/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/comments/23989576"},"html":{"href":"https://github.com/framgia/tms_9/pull/13#discussion_r23989576"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_9/pulls/13","id":28534501,"html_url":"https://github.com/framgia/tms_9/pull/13","diff_url":"https://github.com/framgia/tms_9/pull/13.diff","patch_url":"https://github.com/framgia/tms_9/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/tms_9/issues/13","number":13,"state":"open","locked":false,"title":"View-Edit","user":{"login":"phuong1492","id":9030738,"avatar_url":"https://avatars.githubusercontent.com/u/9030738?v=3","gravatar_id":"","url":"https://api.github.com/users/phuong1492","html_url":"https://github.com/phuong1492","followers_url":"https://api.github.com/users/phuong1492/followers","following_url":"https://api.github.com/users/phuong1492/following{/other_user}","gists_url":"https://api.github.com/users/phuong1492/gists{/gist_id}","starred_url":"https://api.github.com/users/phuong1492/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuong1492/subscriptions","organizations_url":"https://api.github.com/users/phuong1492/orgs","repos_url":"https://api.github.com/users/phuong1492/repos","events_url":"https://api.github.com/users/phuong1492/events{/privacy}","received_events_url":"https://api.github.com/users/phuong1492/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-03T08:33:30Z","updated_at":"2015-02-03T08:46:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55d71bf2df84a973e9e39670cb7b00c7f0e77870","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_9/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_9/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_9/pulls/comments/{number}","comments_url":"https://api.github.com/repos/framgia/tms_9/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/tms_9/statuses/0d008e8c87540f0ecf9febfa1436f8bb665949a3","head":{"label":"phuong1492:edit-view","ref":"edit-view","sha":"0d008e8c87540f0ecf9febfa1436f8bb665949a3","user":{"login":"phuong1492","id":9030738,"avatar_url":"https://avatars.githubusercontent.com/u/9030738?v=3","gravatar_id":"","url":"https://api.github.com/users/phuong1492","html_url":"https://github.com/phuong1492","followers_url":"https://api.github.com/users/phuong1492/followers","following_url":"https://api.github.com/users/phuong1492/following{/other_user}","gists_url":"https://api.github.com/users/phuong1492/gists{/gist_id}","starred_url":"https://api.github.com/users/phuong1492/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuong1492/subscriptions","organizations_url":"https://api.github.com/users/phuong1492/orgs","repos_url":"https://api.github.com/users/phuong1492/repos","events_url":"https://api.github.com/users/phuong1492/events{/privacy}","received_events_url":"https://api.github.com/users/phuong1492/received_events","type":"User","site_admin":false},"repo":{"id":29846588,"name":"tms_9","full_name":"phuong1492/tms_9","owner":{"login":"phuong1492","id":9030738,"avatar_url":"https://avatars.githubusercontent.com/u/9030738?v=3","gravatar_id":"","url":"https://api.github.com/users/phuong1492","html_url":"https://github.com/phuong1492","followers_url":"https://api.github.com/users/phuong1492/followers","following_url":"https://api.github.com/users/phuong1492/following{/other_user}","gists_url":"https://api.github.com/users/phuong1492/gists{/gist_id}","starred_url":"https://api.github.com/users/phuong1492/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuong1492/subscriptions","organizations_url":"https://api.github.com/users/phuong1492/orgs","repos_url":"https://api.github.com/users/phuong1492/repos","events_url":"https://api.github.com/users/phuong1492/events{/privacy}","received_events_url":"https://api.github.com/users/phuong1492/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phuong1492/tms_9","description":"Framgia Training Management System (training)","fork":true,"url":"https://api.github.com/repos/phuong1492/tms_9","forks_url":"https://api.github.com/repos/phuong1492/tms_9/forks","keys_url":"https://api.github.com/repos/phuong1492/tms_9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phuong1492/tms_9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phuong1492/tms_9/teams","hooks_url":"https://api.github.com/repos/phuong1492/tms_9/hooks","issue_events_url":"https://api.github.com/repos/phuong1492/tms_9/issues/events{/number}","events_url":"https://api.github.com/repos/phuong1492/tms_9/events","assignees_url":"https://api.github.com/repos/phuong1492/tms_9/assignees{/user}","branches_url":"https://api.github.com/repos/phuong1492/tms_9/branches{/branch}","tags_url":"https://api.github.com/repos/phuong1492/tms_9/tags","blobs_url":"https://api.github.com/repos/phuong1492/tms_9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phuong1492/tms_9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phuong1492/tms_9/git/refs{/sha}","trees_url":"https://api.github.com/repos/phuong1492/tms_9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phuong1492/tms_9/statuses/{sha}","languages_url":"https://api.github.com/repos/phuong1492/tms_9/languages","stargazers_url":"https://api.github.com/repos/phuong1492/tms_9/stargazers","contributors_url":"https://api.github.com/repos/phuong1492/tms_9/contributors","subscribers_url":"https://api.github.com/repos/phuong1492/tms_9/subscribers","subscription_url":"https://api.github.com/repos/phuong1492/tms_9/subscription","commits_url":"https://api.github.com/repos/phuong1492/tms_9/commits{/sha}","git_commits_url":"https://api.github.com/repos/phuong1492/tms_9/git/commits{/sha}","comments_url":"https://api.github.com/repos/phuong1492/tms_9/comments{/number}","issue_comment_url":"https://api.github.com/repos/phuong1492/tms_9/issues/comments/{number}","contents_url":"https://api.github.com/repos/phuong1492/tms_9/contents/{+path}","compare_url":"https://api.github.com/repos/phuong1492/tms_9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phuong1492/tms_9/merges","archive_url":"https://api.github.com/repos/phuong1492/tms_9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phuong1492/tms_9/downloads","issues_url":"https://api.github.com/repos/phuong1492/tms_9/issues{/number}","pulls_url":"https://api.github.com/repos/phuong1492/tms_9/pulls{/number}","milestones_url":"https://api.github.com/repos/phuong1492/tms_9/milestones{/number}","notifications_url":"https://api.github.com/repos/phuong1492/tms_9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phuong1492/tms_9/labels{/name}","releases_url":"https://api.github.com/repos/phuong1492/tms_9/releases{/id}","created_at":"2015-01-26T05:37:15Z","updated_at":"2015-01-24T12:06:42Z","pushed_at":"2015-02-03T08:33:00Z","git_url":"git://github.com/phuong1492/tms_9.git","ssh_url":"git@github.com:phuong1492/tms_9.git","clone_url":"https://github.com/phuong1492/tms_9.git","svn_url":"https://github.com/phuong1492/tms_9","homepage":null,"size":167,"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":"03d78c1078fddbdf2ac2774ce145aca35539596b","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":29775306,"name":"tms_9","full_name":"framgia/tms_9","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_9","description":"Framgia Training Management System (training)","fork":false,"url":"https://api.github.com/repos/framgia/tms_9","forks_url":"https://api.github.com/repos/framgia/tms_9/forks","keys_url":"https://api.github.com/repos/framgia/tms_9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_9/teams","hooks_url":"https://api.github.com/repos/framgia/tms_9/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_9/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_9/events","assignees_url":"https://api.github.com/repos/framgia/tms_9/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_9/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_9/tags","blobs_url":"https://api.github.com/repos/framgia/tms_9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_9/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_9/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_9/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_9/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_9/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_9/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_9/subscription","commits_url":"https://api.github.com/repos/framgia/tms_9/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_9/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_9/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_9/issues/comments/{number}","contents_url":"https://api.github.com/repos/framgia/tms_9/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_9/merges","archive_url":"https://api.github.com/repos/framgia/tms_9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_9/downloads","issues_url":"https://api.github.com/repos/framgia/tms_9/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_9/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_9/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_9/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_9/releases{/id}","created_at":"2015-01-24T12:06:42Z","updated_at":"2015-01-24T12:06:42Z","pushed_at":"2015-02-03T07:26:41Z","git_url":"git://github.com/framgia/tms_9.git","ssh_url":"git@github.com:framgia/tms_9.git","clone_url":"https://github.com/framgia/tms_9.git","svn_url":"https://github.com/framgia/tms_9","homepage":null,"size":377,"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":7,"forks":3,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/13"},"html":{"href":"https://github.com/framgia/tms_9/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/tms_9/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/tms_9/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_9/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_9/statuses/0d008e8c87540f0ecf9febfa1436f8bb665949a3"}}}}