{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_11/pulls/comments/27458016","id":27458016,"diff_hunk":"@@ -1,7 +1,60 @@\n class BooksController < ApplicationController\n+  before_action :logged_in_user, only: [:new, :edit]\n+  before_action :admin_user, only: [:new, :create, :edit, :update, :destroy ]","path":"app/controllers/books_controller.rb","position":3,"original_position":3,"commit_id":"66e60760833a824ea4d39abb39859f0b00a77977","original_commit_id":"66e60760833a824ea4d39abb39859f0b00a77977","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":"redundant a space at last","created_at":"2015-03-31T07:39:32Z","updated_at":"2015-03-31T07:39:32Z","html_url":"https://github.com/framgia/brs_11/pull/8#discussion_r27458016","pull_request_url":"https://api.github.com/repos/framgia/brs_11/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_11/pulls/comments/27458016"},"html":{"href":"https://github.com/framgia/brs_11/pull/8#discussion_r27458016"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_11/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_11/pulls/8","id":32296751,"html_url":"https://github.com/framgia/brs_11/pull/8","diff_url":"https://github.com/framgia/brs_11/pull/8.diff","patch_url":"https://github.com/framgia/brs_11/pull/8.patch","issue_url":"https://api.github.com/repos/framgia/brs_11/issues/8","number":8,"state":"open","locked":false,"title":"Admin users create, update and destroy book.","user":{"login":"cuongnguyen2503","id":9583215,"avatar_url":"https://avatars.githubusercontent.com/u/9583215?v=3","gravatar_id":"","url":"https://api.github.com/users/cuongnguyen2503","html_url":"https://github.com/cuongnguyen2503","followers_url":"https://api.github.com/users/cuongnguyen2503/followers","following_url":"https://api.github.com/users/cuongnguyen2503/following{/other_user}","gists_url":"https://api.github.com/users/cuongnguyen2503/gists{/gist_id}","starred_url":"https://api.github.com/users/cuongnguyen2503/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuongnguyen2503/subscriptions","organizations_url":"https://api.github.com/users/cuongnguyen2503/orgs","repos_url":"https://api.github.com/users/cuongnguyen2503/repos","events_url":"https://api.github.com/users/cuongnguyen2503/events{/privacy}","received_events_url":"https://api.github.com/users/cuongnguyen2503/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-31T07:22:20Z","updated_at":"2015-03-31T07:39:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e46fd790af3f66c1343770691ac1e759d5871d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_11/pulls/8/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_11/pulls/8/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_11/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_11/issues/8/comments","statuses_url":"https://api.github.com/repos/framgia/brs_11/statuses/66e60760833a824ea4d39abb39859f0b00a77977","head":{"label":"cuongnguyen2503:brs11-books","ref":"brs11-books","sha":"66e60760833a824ea4d39abb39859f0b00a77977","user":{"login":"cuongnguyen2503","id":9583215,"avatar_url":"https://avatars.githubusercontent.com/u/9583215?v=3","gravatar_id":"","url":"https://api.github.com/users/cuongnguyen2503","html_url":"https://github.com/cuongnguyen2503","followers_url":"https://api.github.com/users/cuongnguyen2503/followers","following_url":"https://api.github.com/users/cuongnguyen2503/following{/other_user}","gists_url":"https://api.github.com/users/cuongnguyen2503/gists{/gist_id}","starred_url":"https://api.github.com/users/cuongnguyen2503/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuongnguyen2503/subscriptions","organizations_url":"https://api.github.com/users/cuongnguyen2503/orgs","repos_url":"https://api.github.com/users/cuongnguyen2503/repos","events_url":"https://api.github.com/users/cuongnguyen2503/events{/privacy}","received_events_url":"https://api.github.com/users/cuongnguyen2503/received_events","type":"User","site_admin":false},"repo":{"id":32836217,"name":"brs_11","full_name":"cuongnguyen2503/brs_11","owner":{"login":"cuongnguyen2503","id":9583215,"avatar_url":"https://avatars.githubusercontent.com/u/9583215?v=3","gravatar_id":"","url":"https://api.github.com/users/cuongnguyen2503","html_url":"https://github.com/cuongnguyen2503","followers_url":"https://api.github.com/users/cuongnguyen2503/followers","following_url":"https://api.github.com/users/cuongnguyen2503/following{/other_user}","gists_url":"https://api.github.com/users/cuongnguyen2503/gists{/gist_id}","starred_url":"https://api.github.com/users/cuongnguyen2503/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuongnguyen2503/subscriptions","organizations_url":"https://api.github.com/users/cuongnguyen2503/orgs","repos_url":"https://api.github.com/users/cuongnguyen2503/repos","events_url":"https://api.github.com/users/cuongnguyen2503/events{/privacy}","received_events_url":"https://api.github.com/users/cuongnguyen2503/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cuongnguyen2503/brs_11","description":"Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/cuongnguyen2503/brs_11","forks_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/forks","keys_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/teams","hooks_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/hooks","issue_events_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/issues/events{/number}","events_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/events","assignees_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/assignees{/user}","branches_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/branches{/branch}","tags_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/tags","blobs_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/statuses/{sha}","languages_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/languages","stargazers_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/stargazers","contributors_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/contributors","subscribers_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/subscribers","subscription_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/subscription","commits_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/contents/{+path}","compare_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/merges","archive_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/downloads","issues_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/issues{/number}","pulls_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/pulls{/number}","milestones_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/milestones{/number}","notifications_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/labels{/name}","releases_url":"https://api.github.com/repos/cuongnguyen2503/brs_11/releases{/id}","created_at":"2015-03-25T01:49:39Z","updated_at":"2015-03-24T02:19:15Z","pushed_at":"2015-03-31T07:21:30Z","git_url":"git://github.com/cuongnguyen2503/brs_11.git","ssh_url":"git@github.com:cuongnguyen2503/brs_11.git","clone_url":"https://github.com/cuongnguyen2503/brs_11.git","svn_url":"https://github.com/cuongnguyen2503/brs_11","homepage":null,"size":104,"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":"f97b1dd10ddf9a122494d8c1552b58da86be4e89","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":32770915,"name":"brs_11","full_name":"framgia/brs_11","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_11","description":"Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_11","forks_url":"https://api.github.com/repos/framgia/brs_11/forks","keys_url":"https://api.github.com/repos/framgia/brs_11/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_11/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_11/teams","hooks_url":"https://api.github.com/repos/framgia/brs_11/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_11/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_11/events","assignees_url":"https://api.github.com/repos/framgia/brs_11/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_11/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_11/tags","blobs_url":"https://api.github.com/repos/framgia/brs_11/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_11/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_11/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_11/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_11/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_11/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_11/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_11/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_11/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_11/subscription","commits_url":"https://api.github.com/repos/framgia/brs_11/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_11/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_11/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_11/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_11/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_11/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_11/merges","archive_url":"https://api.github.com/repos/framgia/brs_11/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_11/downloads","issues_url":"https://api.github.com/repos/framgia/brs_11/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_11/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_11/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_11/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_11/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_11/releases{/id}","created_at":"2015-03-24T02:19:15Z","updated_at":"2015-03-24T02:19:15Z","pushed_at":"2015-03-31T07:35:05Z","git_url":"git://github.com/framgia/brs_11.git","ssh_url":"git@github.com:framgia/brs_11.git","clone_url":"https://github.com/framgia/brs_11.git","svn_url":"https://github.com/framgia/brs_11","homepage":null,"size":298,"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/brs_11/pulls/8"},"html":{"href":"https://github.com/framgia/brs_11/pull/8"},"issue":{"href":"https://api.github.com/repos/framgia/brs_11/issues/8"},"comments":{"href":"https://api.github.com/repos/framgia/brs_11/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_11/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_11/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_11/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_11/statuses/66e60760833a824ea4d39abb39859f0b00a77977"}}}}