{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_13/pulls/comments/33019498","id":33019498,"diff_hunk":"@@ -0,0 +1,24 @@\n+class Admins::BooksController < ApplicationController\n+before_action :authenticate_admin!\n+\n+  def new\n+    @book = Book.new\n+    @categories = Category.all\n+    @authors = Author.all\n+  end\n+\n+  def create\n+    @book = Book.new book_params\n+    if @book.save\n+      flash[:success] = t \"flash.create_succes\"\n+      redirect_to \"#\"","path":"app/controllers/admins/books_controller.rb","position":14,"original_position":14,"commit_id":"0b9ba9fc1808ad8a66e7a74128114eac2d3d70c0","original_commit_id":"0b9ba9fc1808ad8a66e7a74128114eac2d3d70c0","user":{"login":"chuanhtuan","id":5590771,"avatar_url":"https://avatars.githubusercontent.com/u/5590771?v=3","gravatar_id":"","url":"https://api.github.com/users/chuanhtuan","html_url":"https://github.com/chuanhtuan","followers_url":"https://api.github.com/users/chuanhtuan/followers","following_url":"https://api.github.com/users/chuanhtuan/following{/other_user}","gists_url":"https://api.github.com/users/chuanhtuan/gists{/gist_id}","starred_url":"https://api.github.com/users/chuanhtuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuanhtuan/subscriptions","organizations_url":"https://api.github.com/users/chuanhtuan/orgs","repos_url":"https://api.github.com/users/chuanhtuan/repos","events_url":"https://api.github.com/users/chuanhtuan/events{/privacy}","received_events_url":"https://api.github.com/users/chuanhtuan/received_events","type":"User","site_admin":false},"body":"???","created_at":"2015-06-23T08:29:05Z","updated_at":"2015-06-23T08:29:05Z","html_url":"https://github.com/framgia/brs_13/pull/16#discussion_r33019498","pull_request_url":"https://api.github.com/repos/framgia/brs_13/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_13/pulls/comments/33019498"},"html":{"href":"https://github.com/framgia/brs_13/pull/16#discussion_r33019498"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_13/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_13/pulls/16","id":38294204,"html_url":"https://github.com/framgia/brs_13/pull/16","diff_url":"https://github.com/framgia/brs_13/pull/16.diff","patch_url":"https://github.com/framgia/brs_13/pull/16.patch","issue_url":"https://api.github.com/repos/framgia/brs_13/issues/16","number":16,"state":"open","locked":false,"title":"add_book","user":{"login":"phornsopheak","id":11750991,"avatar_url":"https://avatars.githubusercontent.com/u/11750991?v=3","gravatar_id":"","url":"https://api.github.com/users/phornsopheak","html_url":"https://github.com/phornsopheak","followers_url":"https://api.github.com/users/phornsopheak/followers","following_url":"https://api.github.com/users/phornsopheak/following{/other_user}","gists_url":"https://api.github.com/users/phornsopheak/gists{/gist_id}","starred_url":"https://api.github.com/users/phornsopheak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phornsopheak/subscriptions","organizations_url":"https://api.github.com/users/phornsopheak/orgs","repos_url":"https://api.github.com/users/phornsopheak/repos","events_url":"https://api.github.com/users/phornsopheak/events{/privacy}","received_events_url":"https://api.github.com/users/phornsopheak/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-23T01:45:36Z","updated_at":"2015-06-23T08:29:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba36e0c4ef68452d0705f6a38e9de03e38c149c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_13/pulls/16/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_13/pulls/16/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_13/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_13/issues/16/comments","statuses_url":"https://api.github.com/repos/framgia/brs_13/statuses/0b9ba9fc1808ad8a66e7a74128114eac2d3d70c0","head":{"label":"phornsopheak:add_book","ref":"add_book","sha":"0b9ba9fc1808ad8a66e7a74128114eac2d3d70c0","user":{"login":"phornsopheak","id":11750991,"avatar_url":"https://avatars.githubusercontent.com/u/11750991?v=3","gravatar_id":"","url":"https://api.github.com/users/phornsopheak","html_url":"https://github.com/phornsopheak","followers_url":"https://api.github.com/users/phornsopheak/followers","following_url":"https://api.github.com/users/phornsopheak/following{/other_user}","gists_url":"https://api.github.com/users/phornsopheak/gists{/gist_id}","starred_url":"https://api.github.com/users/phornsopheak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phornsopheak/subscriptions","organizations_url":"https://api.github.com/users/phornsopheak/orgs","repos_url":"https://api.github.com/users/phornsopheak/repos","events_url":"https://api.github.com/users/phornsopheak/events{/privacy}","received_events_url":"https://api.github.com/users/phornsopheak/received_events","type":"User","site_admin":false},"repo":{"id":37565794,"name":"brs_13","full_name":"phornsopheak/brs_13","owner":{"login":"phornsopheak","id":11750991,"avatar_url":"https://avatars.githubusercontent.com/u/11750991?v=3","gravatar_id":"","url":"https://api.github.com/users/phornsopheak","html_url":"https://github.com/phornsopheak","followers_url":"https://api.github.com/users/phornsopheak/followers","following_url":"https://api.github.com/users/phornsopheak/following{/other_user}","gists_url":"https://api.github.com/users/phornsopheak/gists{/gist_id}","starred_url":"https://api.github.com/users/phornsopheak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phornsopheak/subscriptions","organizations_url":"https://api.github.com/users/phornsopheak/orgs","repos_url":"https://api.github.com/users/phornsopheak/repos","events_url":"https://api.github.com/users/phornsopheak/events{/privacy}","received_events_url":"https://api.github.com/users/phornsopheak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phornsopheak/brs_13","description":"Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/phornsopheak/brs_13","forks_url":"https://api.github.com/repos/phornsopheak/brs_13/forks","keys_url":"https://api.github.com/repos/phornsopheak/brs_13/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phornsopheak/brs_13/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phornsopheak/brs_13/teams","hooks_url":"https://api.github.com/repos/phornsopheak/brs_13/hooks","issue_events_url":"https://api.github.com/repos/phornsopheak/brs_13/issues/events{/number}","events_url":"https://api.github.com/repos/phornsopheak/brs_13/events","assignees_url":"https://api.github.com/repos/phornsopheak/brs_13/assignees{/user}","branches_url":"https://api.github.com/repos/phornsopheak/brs_13/branches{/branch}","tags_url":"https://api.github.com/repos/phornsopheak/brs_13/tags","blobs_url":"https://api.github.com/repos/phornsopheak/brs_13/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phornsopheak/brs_13/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phornsopheak/brs_13/git/refs{/sha}","trees_url":"https://api.github.com/repos/phornsopheak/brs_13/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phornsopheak/brs_13/statuses/{sha}","languages_url":"https://api.github.com/repos/phornsopheak/brs_13/languages","stargazers_url":"https://api.github.com/repos/phornsopheak/brs_13/stargazers","contributors_url":"https://api.github.com/repos/phornsopheak/brs_13/contributors","subscribers_url":"https://api.github.com/repos/phornsopheak/brs_13/subscribers","subscription_url":"https://api.github.com/repos/phornsopheak/brs_13/subscription","commits_url":"https://api.github.com/repos/phornsopheak/brs_13/commits{/sha}","git_commits_url":"https://api.github.com/repos/phornsopheak/brs_13/git/commits{/sha}","comments_url":"https://api.github.com/repos/phornsopheak/brs_13/comments{/number}","issue_comment_url":"https://api.github.com/repos/phornsopheak/brs_13/issues/comments{/number}","contents_url":"https://api.github.com/repos/phornsopheak/brs_13/contents/{+path}","compare_url":"https://api.github.com/repos/phornsopheak/brs_13/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phornsopheak/brs_13/merges","archive_url":"https://api.github.com/repos/phornsopheak/brs_13/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phornsopheak/brs_13/downloads","issues_url":"https://api.github.com/repos/phornsopheak/brs_13/issues{/number}","pulls_url":"https://api.github.com/repos/phornsopheak/brs_13/pulls{/number}","milestones_url":"https://api.github.com/repos/phornsopheak/brs_13/milestones{/number}","notifications_url":"https://api.github.com/repos/phornsopheak/brs_13/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phornsopheak/brs_13/labels{/name}","releases_url":"https://api.github.com/repos/phornsopheak/brs_13/releases{/id}","created_at":"2015-06-17T01:37:42Z","updated_at":"2015-06-16T07:40:34Z","pushed_at":"2015-06-23T01:56:42Z","git_url":"git://github.com/phornsopheak/brs_13.git","ssh_url":"git@github.com:phornsopheak/brs_13.git","clone_url":"https://github.com/phornsopheak/brs_13.git","svn_url":"https://github.com/phornsopheak/brs_13","homepage":null,"size":144,"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":"035295ae2b4134c3424fa55c786b7efec5e3cab6","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":37515614,"name":"brs_13","full_name":"framgia/brs_13","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_13","description":"Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_13","forks_url":"https://api.github.com/repos/framgia/brs_13/forks","keys_url":"https://api.github.com/repos/framgia/brs_13/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_13/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_13/teams","hooks_url":"https://api.github.com/repos/framgia/brs_13/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_13/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_13/events","assignees_url":"https://api.github.com/repos/framgia/brs_13/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_13/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_13/tags","blobs_url":"https://api.github.com/repos/framgia/brs_13/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_13/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_13/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_13/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_13/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_13/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_13/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_13/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_13/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_13/subscription","commits_url":"https://api.github.com/repos/framgia/brs_13/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_13/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_13/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_13/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_13/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_13/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_13/merges","archive_url":"https://api.github.com/repos/framgia/brs_13/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_13/downloads","issues_url":"https://api.github.com/repos/framgia/brs_13/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_13/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_13/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_13/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_13/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_13/releases{/id}","created_at":"2015-06-16T07:40:34Z","updated_at":"2015-06-16T07:40:34Z","pushed_at":"2015-06-23T01:56:42Z","git_url":"git://github.com/framgia/brs_13.git","ssh_url":"git@github.com:framgia/brs_13.git","clone_url":"https://github.com/framgia/brs_13.git","svn_url":"https://github.com/framgia/brs_13","homepage":null,"size":262,"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_13/pulls/16"},"html":{"href":"https://github.com/framgia/brs_13/pull/16"},"issue":{"href":"https://api.github.com/repos/framgia/brs_13/issues/16"},"comments":{"href":"https://api.github.com/repos/framgia/brs_13/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_13/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_13/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_13/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_13/statuses/0b9ba9fc1808ad8a66e7a74128114eac2d3d70c0"}}}}