{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_56/pulls/comments/30112793","id":30112793,"diff_hunk":"@@ -36,4 +36,15 @@ def log_out\n     session.delete :user_id\n     @current_user = nil\n   end\n+\n+  def admin_user\n+    redirect_to log_in_path unless current_user.level == 1\n+  end\n+\n+  def logged_in_user\n+    unless logged_in?\n+      flash[:danger] = \"Please log in.\"","path":"app/helpers/sessions_helper.rb","position":11,"original_position":11,"commit_id":"19d7988e3c2198994c67c0a6202dd4710df54013","original_commit_id":"19d7988e3c2198994c67c0a6202dd4710df54013","user":{"login":"leduytungframgia","id":11995920,"avatar_url":"https://avatars.githubusercontent.com/u/11995920?v=3","gravatar_id":"","url":"https://api.github.com/users/leduytungframgia","html_url":"https://github.com/leduytungframgia","followers_url":"https://api.github.com/users/leduytungframgia/followers","following_url":"https://api.github.com/users/leduytungframgia/following{/other_user}","gists_url":"https://api.github.com/users/leduytungframgia/gists{/gist_id}","starred_url":"https://api.github.com/users/leduytungframgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leduytungframgia/subscriptions","organizations_url":"https://api.github.com/users/leduytungframgia/orgs","repos_url":"https://api.github.com/users/leduytungframgia/repos","events_url":"https://api.github.com/users/leduytungframgia/events{/privacy}","received_events_url":"https://api.github.com/users/leduytungframgia/received_events","type":"User","site_admin":false},"body":"i18n","created_at":"2015-05-12T08:14:24Z","updated_at":"2015-05-12T08:14:24Z","html_url":"https://github.com/framgia/fels_56/pull/20#discussion_r30112793","pull_request_url":"https://api.github.com/repos/framgia/fels_56/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/comments/30112793"},"html":{"href":"https://github.com/framgia/fels_56/pull/20#discussion_r30112793"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_56/pulls/20","id":35202197,"html_url":"https://github.com/framgia/fels_56/pull/20","diff_url":"https://github.com/framgia/fels_56/pull/20.diff","patch_url":"https://github.com/framgia/fels_56/pull/20.patch","issue_url":"https://api.github.com/repos/framgia/fels_56/issues/20","number":20,"state":"open","locked":false,"title":"Create, update, delete words for admin","user":{"login":"NguyenTanDuc","id":12166369,"avatar_url":"https://avatars.githubusercontent.com/u/12166369?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenTanDuc","html_url":"https://github.com/NguyenTanDuc","followers_url":"https://api.github.com/users/NguyenTanDuc/followers","following_url":"https://api.github.com/users/NguyenTanDuc/following{/other_user}","gists_url":"https://api.github.com/users/NguyenTanDuc/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenTanDuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenTanDuc/subscriptions","organizations_url":"https://api.github.com/users/NguyenTanDuc/orgs","repos_url":"https://api.github.com/users/NguyenTanDuc/repos","events_url":"https://api.github.com/users/NguyenTanDuc/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenTanDuc/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-12T08:11:35Z","updated_at":"2015-05-12T08:14:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47ae9df9228d5047f30a82923e7420874dfab9ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_56/pulls/20/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_56/pulls/20/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_56/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_56/issues/20/comments","statuses_url":"https://api.github.com/repos/framgia/fels_56/statuses/19d7988e3c2198994c67c0a6202dd4710df54013","head":{"label":"NguyenTanDuc:dynamic-wordpage3","ref":"dynamic-wordpage3","sha":"19d7988e3c2198994c67c0a6202dd4710df54013","user":{"login":"NguyenTanDuc","id":12166369,"avatar_url":"https://avatars.githubusercontent.com/u/12166369?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenTanDuc","html_url":"https://github.com/NguyenTanDuc","followers_url":"https://api.github.com/users/NguyenTanDuc/followers","following_url":"https://api.github.com/users/NguyenTanDuc/following{/other_user}","gists_url":"https://api.github.com/users/NguyenTanDuc/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenTanDuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenTanDuc/subscriptions","organizations_url":"https://api.github.com/users/NguyenTanDuc/orgs","repos_url":"https://api.github.com/users/NguyenTanDuc/repos","events_url":"https://api.github.com/users/NguyenTanDuc/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenTanDuc/received_events","type":"User","site_admin":false},"repo":{"id":35206975,"name":"fels_56","full_name":"NguyenTanDuc/fels_56","owner":{"login":"NguyenTanDuc","id":12166369,"avatar_url":"https://avatars.githubusercontent.com/u/12166369?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenTanDuc","html_url":"https://github.com/NguyenTanDuc","followers_url":"https://api.github.com/users/NguyenTanDuc/followers","following_url":"https://api.github.com/users/NguyenTanDuc/following{/other_user}","gists_url":"https://api.github.com/users/NguyenTanDuc/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenTanDuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenTanDuc/subscriptions","organizations_url":"https://api.github.com/users/NguyenTanDuc/orgs","repos_url":"https://api.github.com/users/NguyenTanDuc/repos","events_url":"https://api.github.com/users/NguyenTanDuc/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenTanDuc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NguyenTanDuc/fels_56","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/NguyenTanDuc/fels_56","forks_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/forks","keys_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/teams","hooks_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/hooks","issue_events_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/issues/events{/number}","events_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/events","assignees_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/assignees{/user}","branches_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/branches{/branch}","tags_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/tags","blobs_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/git/refs{/sha}","trees_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/statuses/{sha}","languages_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/languages","stargazers_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/stargazers","contributors_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/contributors","subscribers_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/subscribers","subscription_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/subscription","commits_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/commits{/sha}","git_commits_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/git/commits{/sha}","comments_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/comments{/number}","issue_comment_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/issues/comments{/number}","contents_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/contents/{+path}","compare_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/merges","archive_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/downloads","issues_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/issues{/number}","pulls_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/pulls{/number}","milestones_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/milestones{/number}","notifications_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/labels{/name}","releases_url":"https://api.github.com/repos/NguyenTanDuc/fels_56/releases{/id}","created_at":"2015-05-07T08:04:09Z","updated_at":"2015-05-06T06:44:03Z","pushed_at":"2015-05-12T08:12:41Z","git_url":"git://github.com/NguyenTanDuc/fels_56.git","ssh_url":"git@github.com:NguyenTanDuc/fels_56.git","clone_url":"https://github.com/NguyenTanDuc/fels_56.git","svn_url":"https://github.com/NguyenTanDuc/fels_56","homepage":null,"size":155,"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":"2ded068e22b9f1a75d3f6a0c9f4c85e472dd47cb","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":35143594,"name":"fels_56","full_name":"framgia/fels_56","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_56","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_56","forks_url":"https://api.github.com/repos/framgia/fels_56/forks","keys_url":"https://api.github.com/repos/framgia/fels_56/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_56/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_56/teams","hooks_url":"https://api.github.com/repos/framgia/fels_56/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_56/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_56/events","assignees_url":"https://api.github.com/repos/framgia/fels_56/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_56/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_56/tags","blobs_url":"https://api.github.com/repos/framgia/fels_56/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_56/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_56/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_56/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_56/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_56/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_56/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_56/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_56/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_56/subscription","commits_url":"https://api.github.com/repos/framgia/fels_56/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_56/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_56/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_56/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_56/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_56/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_56/merges","archive_url":"https://api.github.com/repos/framgia/fels_56/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_56/downloads","issues_url":"https://api.github.com/repos/framgia/fels_56/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_56/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_56/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_56/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_56/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_56/releases{/id}","created_at":"2015-05-06T06:44:03Z","updated_at":"2015-05-06T06:44:03Z","pushed_at":"2015-05-12T08:12:41Z","git_url":"git://github.com/framgia/fels_56.git","ssh_url":"git@github.com:framgia/fels_56.git","clone_url":"https://github.com/framgia/fels_56.git","svn_url":"https://github.com/framgia/fels_56","homepage":null,"size":536,"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":9,"forks":2,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/20"},"html":{"href":"https://github.com/framgia/fels_56/pull/20"},"issue":{"href":"https://api.github.com/repos/framgia/fels_56/issues/20"},"comments":{"href":"https://api.github.com/repos/framgia/fels_56/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_56/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_56/statuses/19d7988e3c2198994c67c0a6202dd4710df54013"}}}}