{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_35/pulls/comments/81316552","pull_request_review_id":2304592,"id":81316552,"diff_hunk":"@@ -0,0 +1,23 @@\n+class Admin::SessionsController < ApplicationController\n+  layout \"admin_application_login\"\n+\n+  def new\n+  end\n+\n+  def create\n+    user = User.find_by email: params[:session][:email].downcase, role: 1\n+    if user && user.authenticate(params[:session][:password])\n+      log_in user\n+      redirect_to admin_root_path\n+    else\n+      flash.now[:danger] = 'Invalid email/password combination'\n+      render 'new'","path":"app/controllers/admin/sessions_controller.rb","position":14,"original_position":14,"commit_id":"19a1978a7482529592d0ebbdcdde44dccbec22cb","original_commit_id":"19a1978a7482529592d0ebbdcdde44dccbec22cb","user":{"login":"nvtanh","id":5591946,"avatar_url":"https://avatars.githubusercontent.com/u/5591946?v=3","gravatar_id":"","url":"https://api.github.com/users/nvtanh","html_url":"https://github.com/nvtanh","followers_url":"https://api.github.com/users/nvtanh/followers","following_url":"https://api.github.com/users/nvtanh/following{/other_user}","gists_url":"https://api.github.com/users/nvtanh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvtanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvtanh/subscriptions","organizations_url":"https://api.github.com/users/nvtanh/orgs","repos_url":"https://api.github.com/users/nvtanh/repos","events_url":"https://api.github.com/users/nvtanh/events{/privacy}","received_events_url":"https://api.github.com/users/nvtanh/received_events","type":"User","site_admin":false},"body":":new ","created_at":"2016-09-30T10:41:00Z","updated_at":"2016-09-30T10:41:00Z","html_url":"https://github.com/framgia/brs_35/pull/6#discussion_r81316552","pull_request_url":"https://api.github.com/repos/framgia/brs_35/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/comments/81316552"},"html":{"href":"https://github.com/framgia/brs_35/pull/6#discussion_r81316552"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_35/pulls/6","id":87460638,"html_url":"https://github.com/framgia/brs_35/pull/6","diff_url":"https://github.com/framgia/brs_35/pull/6.diff","patch_url":"https://github.com/framgia/brs_35/pull/6.patch","issue_url":"https://api.github.com/repos/framgia/brs_35/issues/6","number":6,"state":"open","locked":false,"title":"login logout for admin section","user":{"login":"quyenguyengoc","id":22010913,"avatar_url":"https://avatars.githubusercontent.com/u/22010913?v=3","gravatar_id":"","url":"https://api.github.com/users/quyenguyengoc","html_url":"https://github.com/quyenguyengoc","followers_url":"https://api.github.com/users/quyenguyengoc/followers","following_url":"https://api.github.com/users/quyenguyengoc/following{/other_user}","gists_url":"https://api.github.com/users/quyenguyengoc/gists{/gist_id}","starred_url":"https://api.github.com/users/quyenguyengoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quyenguyengoc/subscriptions","organizations_url":"https://api.github.com/users/quyenguyengoc/orgs","repos_url":"https://api.github.com/users/quyenguyengoc/repos","events_url":"https://api.github.com/users/quyenguyengoc/events{/privacy}","received_events_url":"https://api.github.com/users/quyenguyengoc/received_events","type":"User","site_admin":false},"body":"Ok fine!","created_at":"2016-09-30T09:22:36Z","updated_at":"2016-09-30T10:46:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7a55b4aed7f8d1d76861bf02e49c2d78e16dd0c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_35/pulls/6/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_35/pulls/6/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_35/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_35/issues/6/comments","statuses_url":"https://api.github.com/repos/framgia/brs_35/statuses/19a1978a7482529592d0ebbdcdde44dccbec22cb","head":{"label":"quyenguyengoc:login-logout-admin","ref":"login-logout-admin","sha":"19a1978a7482529592d0ebbdcdde44dccbec22cb","user":{"login":"quyenguyengoc","id":22010913,"avatar_url":"https://avatars.githubusercontent.com/u/22010913?v=3","gravatar_id":"","url":"https://api.github.com/users/quyenguyengoc","html_url":"https://github.com/quyenguyengoc","followers_url":"https://api.github.com/users/quyenguyengoc/followers","following_url":"https://api.github.com/users/quyenguyengoc/following{/other_user}","gists_url":"https://api.github.com/users/quyenguyengoc/gists{/gist_id}","starred_url":"https://api.github.com/users/quyenguyengoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quyenguyengoc/subscriptions","organizations_url":"https://api.github.com/users/quyenguyengoc/orgs","repos_url":"https://api.github.com/users/quyenguyengoc/repos","events_url":"https://api.github.com/users/quyenguyengoc/events{/privacy}","received_events_url":"https://api.github.com/users/quyenguyengoc/received_events","type":"User","site_admin":false},"repo":{"id":69517298,"name":"brs_35","full_name":"quyenguyengoc/brs_35","owner":{"login":"quyenguyengoc","id":22010913,"avatar_url":"https://avatars.githubusercontent.com/u/22010913?v=3","gravatar_id":"","url":"https://api.github.com/users/quyenguyengoc","html_url":"https://github.com/quyenguyengoc","followers_url":"https://api.github.com/users/quyenguyengoc/followers","following_url":"https://api.github.com/users/quyenguyengoc/following{/other_user}","gists_url":"https://api.github.com/users/quyenguyengoc/gists{/gist_id}","starred_url":"https://api.github.com/users/quyenguyengoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quyenguyengoc/subscriptions","organizations_url":"https://api.github.com/users/quyenguyengoc/orgs","repos_url":"https://api.github.com/users/quyenguyengoc/repos","events_url":"https://api.github.com/users/quyenguyengoc/events{/privacy}","received_events_url":"https://api.github.com/users/quyenguyengoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quyenguyengoc/brs_35","description":"Framgia Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/quyenguyengoc/brs_35","forks_url":"https://api.github.com/repos/quyenguyengoc/brs_35/forks","keys_url":"https://api.github.com/repos/quyenguyengoc/brs_35/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quyenguyengoc/brs_35/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quyenguyengoc/brs_35/teams","hooks_url":"https://api.github.com/repos/quyenguyengoc/brs_35/hooks","issue_events_url":"https://api.github.com/repos/quyenguyengoc/brs_35/issues/events{/number}","events_url":"https://api.github.com/repos/quyenguyengoc/brs_35/events","assignees_url":"https://api.github.com/repos/quyenguyengoc/brs_35/assignees{/user}","branches_url":"https://api.github.com/repos/quyenguyengoc/brs_35/branches{/branch}","tags_url":"https://api.github.com/repos/quyenguyengoc/brs_35/tags","blobs_url":"https://api.github.com/repos/quyenguyengoc/brs_35/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quyenguyengoc/brs_35/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quyenguyengoc/brs_35/git/refs{/sha}","trees_url":"https://api.github.com/repos/quyenguyengoc/brs_35/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quyenguyengoc/brs_35/statuses/{sha}","languages_url":"https://api.github.com/repos/quyenguyengoc/brs_35/languages","stargazers_url":"https://api.github.com/repos/quyenguyengoc/brs_35/stargazers","contributors_url":"https://api.github.com/repos/quyenguyengoc/brs_35/contributors","subscribers_url":"https://api.github.com/repos/quyenguyengoc/brs_35/subscribers","subscription_url":"https://api.github.com/repos/quyenguyengoc/brs_35/subscription","commits_url":"https://api.github.com/repos/quyenguyengoc/brs_35/commits{/sha}","git_commits_url":"https://api.github.com/repos/quyenguyengoc/brs_35/git/commits{/sha}","comments_url":"https://api.github.com/repos/quyenguyengoc/brs_35/comments{/number}","issue_comment_url":"https://api.github.com/repos/quyenguyengoc/brs_35/issues/comments{/number}","contents_url":"https://api.github.com/repos/quyenguyengoc/brs_35/contents/{+path}","compare_url":"https://api.github.com/repos/quyenguyengoc/brs_35/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quyenguyengoc/brs_35/merges","archive_url":"https://api.github.com/repos/quyenguyengoc/brs_35/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quyenguyengoc/brs_35/downloads","issues_url":"https://api.github.com/repos/quyenguyengoc/brs_35/issues{/number}","pulls_url":"https://api.github.com/repos/quyenguyengoc/brs_35/pulls{/number}","milestones_url":"https://api.github.com/repos/quyenguyengoc/brs_35/milestones{/number}","notifications_url":"https://api.github.com/repos/quyenguyengoc/brs_35/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quyenguyengoc/brs_35/labels{/name}","releases_url":"https://api.github.com/repos/quyenguyengoc/brs_35/releases{/id}","deployments_url":"https://api.github.com/repos/quyenguyengoc/brs_35/deployments","created_at":"2016-09-29T01:10:03Z","updated_at":"2016-09-27T09:08:04Z","pushed_at":"2016-09-30T09:21:31Z","git_url":"git://github.com/quyenguyengoc/brs_35.git","ssh_url":"git@github.com:quyenguyengoc/brs_35.git","clone_url":"https://github.com/quyenguyengoc/brs_35.git","svn_url":"https://github.com/quyenguyengoc/brs_35","homepage":null,"size":230,"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":"5b6930dbdee74dee56fd157ca2e941af9815c418","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":69338924,"name":"brs_35","full_name":"framgia/brs_35","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/brs_35","description":"Framgia Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_35","forks_url":"https://api.github.com/repos/framgia/brs_35/forks","keys_url":"https://api.github.com/repos/framgia/brs_35/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_35/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_35/teams","hooks_url":"https://api.github.com/repos/framgia/brs_35/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_35/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_35/events","assignees_url":"https://api.github.com/repos/framgia/brs_35/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_35/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_35/tags","blobs_url":"https://api.github.com/repos/framgia/brs_35/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_35/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_35/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_35/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_35/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_35/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_35/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_35/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_35/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_35/subscription","commits_url":"https://api.github.com/repos/framgia/brs_35/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_35/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_35/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_35/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_35/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_35/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_35/merges","archive_url":"https://api.github.com/repos/framgia/brs_35/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_35/downloads","issues_url":"https://api.github.com/repos/framgia/brs_35/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_35/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_35/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_35/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_35/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_35/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/brs_35/deployments","created_at":"2016-09-27T09:08:04Z","updated_at":"2016-09-27T09:08:04Z","pushed_at":"2016-09-30T09:37:23Z","git_url":"git://github.com/framgia/brs_35.git","ssh_url":"git@github.com:framgia/brs_35.git","clone_url":"https://github.com/framgia/brs_35.git","svn_url":"https://github.com/framgia/brs_35","homepage":null,"size":250,"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":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/6"},"html":{"href":"https://github.com/framgia/brs_35/pull/6"},"issue":{"href":"https://api.github.com/repos/framgia/brs_35/issues/6"},"comments":{"href":"https://api.github.com/repos/framgia/brs_35/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_35/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_35/statuses/19a1978a7482529592d0ebbdcdde44dccbec22cb"}}}}
{"actor":{"display_login":"nvtanh"}}