{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_41/pulls/comments/90573221","pull_request_review_id":11092645,"id":90573221,"diff_hunk":"@@ -0,0 +1,71 @@\n+class ReviewsController < ApplicationController\n+  before_action :midleware_login, only: [:create, :edit, :update, :destroy, :new]\n+  before_action :midleware_admin, only: [:index]\n+  before_action :review_load, only: [:update, :edit, :create, :destroy, :new ]\n+\n+  def index\n+    @reviews = Review.paginate page: params[:page], per_page: Settings.five\n+  end\n+\n+  def update\n+    @book = @review.book\n+    if @review.update_attributes params_update\n+      flash[:success] =  t \"update_success\"\n+      redirect_to @book\n+    else\n+      flash[:success] =  t \"update_error\"\n+      redirect_to :back\n+    end\n+  end\n+\n+  def edit\n+  end\n+\n+  def create\n+    @review = Review.new review_params\n+    if @review.save\n+      flash[:success] = t \"success_create\"\n+      book = Book.find_by_id @review.book_id\n+      redirect_to book\n+    else\n+      flash[:info] = t \"error_create\"\n+      render :new\n+    end\n+  end\n+\n+  def show\n+    @review = review_load\n+    @comments = @review.comments\n+  end\n+\n+  def new\n+    @book_id=params[:book_id]","path":"app/controllers/reviews_controller.rb","position":42,"original_position":42,"commit_id":"7a4bc785c8bbe1e7d30a5dfe1dbb3af630a48f85","original_commit_id":"7a4bc785c8bbe1e7d30a5dfe1dbb3af630a48f85","user":{"login":"tranducquoc","id":17246945,"avatar_url":"https://avatars.githubusercontent.com/u/17246945?v=3","gravatar_id":"","url":"https://api.github.com/users/tranducquoc","html_url":"https://github.com/tranducquoc","followers_url":"https://api.github.com/users/tranducquoc/followers","following_url":"https://api.github.com/users/tranducquoc/following{/other_user}","gists_url":"https://api.github.com/users/tranducquoc/gists{/gist_id}","starred_url":"https://api.github.com/users/tranducquoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranducquoc/subscriptions","organizations_url":"https://api.github.com/users/tranducquoc/orgs","repos_url":"https://api.github.com/users/tranducquoc/repos","events_url":"https://api.github.com/users/tranducquoc/events{/privacy}","received_events_url":"https://api.github.com/users/tranducquoc/received_events","type":"User","site_admin":false},"body":"space trước và sâu dấu  = ","created_at":"2016-12-02T01:34:57Z","updated_at":"2016-12-02T01:38:07Z","html_url":"https://github.com/framgia/brs_41/pull/11#discussion_r90573221","pull_request_url":"https://api.github.com/repos/framgia/brs_41/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/comments/90573221"},"html":{"href":"https://github.com/framgia/brs_41/pull/11#discussion_r90573221"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_41/pulls/11","id":96116701,"html_url":"https://github.com/framgia/brs_41/pull/11","diff_url":"https://github.com/framgia/brs_41/pull/11.diff","patch_url":"https://github.com/framgia/brs_41/pull/11.patch","issue_url":"https://api.github.com/repos/framgia/brs_41/issues/11","number":11,"state":"open","locked":false,"title":"Done review","user":{"login":"khanha1111","id":20850729,"avatar_url":"https://avatars.githubusercontent.com/u/20850729?v=3","gravatar_id":"","url":"https://api.github.com/users/khanha1111","html_url":"https://github.com/khanha1111","followers_url":"https://api.github.com/users/khanha1111/followers","following_url":"https://api.github.com/users/khanha1111/following{/other_user}","gists_url":"https://api.github.com/users/khanha1111/gists{/gist_id}","starred_url":"https://api.github.com/users/khanha1111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khanha1111/subscriptions","organizations_url":"https://api.github.com/users/khanha1111/orgs","repos_url":"https://api.github.com/users/khanha1111/repos","events_url":"https://api.github.com/users/khanha1111/events{/privacy}","received_events_url":"https://api.github.com/users/khanha1111/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-01T16:01:18Z","updated_at":"2016-12-02T01:38:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0a38043d1b41bf9d1fcef1962ea3b3423365ea5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_41/pulls/11/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_41/pulls/11/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_41/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_41/issues/11/comments","statuses_url":"https://api.github.com/repos/framgia/brs_41/statuses/7a4bc785c8bbe1e7d30a5dfe1dbb3af630a48f85","head":{"label":"kewdev:review","ref":"review","sha":"7a4bc785c8bbe1e7d30a5dfe1dbb3af630a48f85","user":{"login":"kewdev","id":23021580,"avatar_url":"https://avatars.githubusercontent.com/u/23021580?v=3","gravatar_id":"","url":"https://api.github.com/users/kewdev","html_url":"https://github.com/kewdev","followers_url":"https://api.github.com/users/kewdev/followers","following_url":"https://api.github.com/users/kewdev/following{/other_user}","gists_url":"https://api.github.com/users/kewdev/gists{/gist_id}","starred_url":"https://api.github.com/users/kewdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kewdev/subscriptions","organizations_url":"https://api.github.com/users/kewdev/orgs","repos_url":"https://api.github.com/users/kewdev/repos","events_url":"https://api.github.com/users/kewdev/events{/privacy}","received_events_url":"https://api.github.com/users/kewdev/received_events","type":"User","site_admin":false},"repo":{"id":75054675,"name":"brs_41","full_name":"kewdev/brs_41","owner":{"login":"kewdev","id":23021580,"avatar_url":"https://avatars.githubusercontent.com/u/23021580?v=3","gravatar_id":"","url":"https://api.github.com/users/kewdev","html_url":"https://github.com/kewdev","followers_url":"https://api.github.com/users/kewdev/followers","following_url":"https://api.github.com/users/kewdev/following{/other_user}","gists_url":"https://api.github.com/users/kewdev/gists{/gist_id}","starred_url":"https://api.github.com/users/kewdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kewdev/subscriptions","organizations_url":"https://api.github.com/users/kewdev/orgs","repos_url":"https://api.github.com/users/kewdev/repos","events_url":"https://api.github.com/users/kewdev/events{/privacy}","received_events_url":"https://api.github.com/users/kewdev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kewdev/brs_41","description":null,"fork":true,"url":"https://api.github.com/repos/kewdev/brs_41","forks_url":"https://api.github.com/repos/kewdev/brs_41/forks","keys_url":"https://api.github.com/repos/kewdev/brs_41/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kewdev/brs_41/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kewdev/brs_41/teams","hooks_url":"https://api.github.com/repos/kewdev/brs_41/hooks","issue_events_url":"https://api.github.com/repos/kewdev/brs_41/issues/events{/number}","events_url":"https://api.github.com/repos/kewdev/brs_41/events","assignees_url":"https://api.github.com/repos/kewdev/brs_41/assignees{/user}","branches_url":"https://api.github.com/repos/kewdev/brs_41/branches{/branch}","tags_url":"https://api.github.com/repos/kewdev/brs_41/tags","blobs_url":"https://api.github.com/repos/kewdev/brs_41/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kewdev/brs_41/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kewdev/brs_41/git/refs{/sha}","trees_url":"https://api.github.com/repos/kewdev/brs_41/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kewdev/brs_41/statuses/{sha}","languages_url":"https://api.github.com/repos/kewdev/brs_41/languages","stargazers_url":"https://api.github.com/repos/kewdev/brs_41/stargazers","contributors_url":"https://api.github.com/repos/kewdev/brs_41/contributors","subscribers_url":"https://api.github.com/repos/kewdev/brs_41/subscribers","subscription_url":"https://api.github.com/repos/kewdev/brs_41/subscription","commits_url":"https://api.github.com/repos/kewdev/brs_41/commits{/sha}","git_commits_url":"https://api.github.com/repos/kewdev/brs_41/git/commits{/sha}","comments_url":"https://api.github.com/repos/kewdev/brs_41/comments{/number}","issue_comment_url":"https://api.github.com/repos/kewdev/brs_41/issues/comments{/number}","contents_url":"https://api.github.com/repos/kewdev/brs_41/contents/{+path}","compare_url":"https://api.github.com/repos/kewdev/brs_41/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kewdev/brs_41/merges","archive_url":"https://api.github.com/repos/kewdev/brs_41/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kewdev/brs_41/downloads","issues_url":"https://api.github.com/repos/kewdev/brs_41/issues{/number}","pulls_url":"https://api.github.com/repos/kewdev/brs_41/pulls{/number}","milestones_url":"https://api.github.com/repos/kewdev/brs_41/milestones{/number}","notifications_url":"https://api.github.com/repos/kewdev/brs_41/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kewdev/brs_41/labels{/name}","releases_url":"https://api.github.com/repos/kewdev/brs_41/releases{/id}","deployments_url":"https://api.github.com/repos/kewdev/brs_41/deployments","created_at":"2016-11-29T07:24:43Z","updated_at":"2016-11-16T04:29:55Z","pushed_at":"2016-12-01T16:00:11Z","git_url":"git://github.com/kewdev/brs_41.git","ssh_url":"git@github.com:kewdev/brs_41.git","clone_url":"https://github.com/kewdev/brs_41.git","svn_url":"https://github.com/kewdev/brs_41","homepage":null,"size":5759,"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":"93e1edce96a7f74b2c238449055fc18e737df60e","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":73884082,"name":"brs_41","full_name":"framgia/brs_41","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_41","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/brs_41","forks_url":"https://api.github.com/repos/framgia/brs_41/forks","keys_url":"https://api.github.com/repos/framgia/brs_41/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_41/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_41/teams","hooks_url":"https://api.github.com/repos/framgia/brs_41/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_41/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_41/events","assignees_url":"https://api.github.com/repos/framgia/brs_41/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_41/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_41/tags","blobs_url":"https://api.github.com/repos/framgia/brs_41/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_41/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_41/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_41/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_41/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_41/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_41/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_41/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_41/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_41/subscription","commits_url":"https://api.github.com/repos/framgia/brs_41/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_41/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_41/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_41/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_41/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_41/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_41/merges","archive_url":"https://api.github.com/repos/framgia/brs_41/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_41/downloads","issues_url":"https://api.github.com/repos/framgia/brs_41/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_41/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_41/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_41/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_41/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_41/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/brs_41/deployments","created_at":"2016-11-16T04:29:55Z","updated_at":"2016-11-16T04:29:55Z","pushed_at":"2016-12-01T16:01:18Z","git_url":"git://github.com/framgia/brs_41.git","ssh_url":"git@github.com:framgia/brs_41.git","clone_url":"https://github.com/framgia/brs_41.git","svn_url":"https://github.com/framgia/brs_41","homepage":null,"size":1403,"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":8,"forks":3,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/11"},"html":{"href":"https://github.com/framgia/brs_41/pull/11"},"issue":{"href":"https://api.github.com/repos/framgia/brs_41/issues/11"},"comments":{"href":"https://api.github.com/repos/framgia/brs_41/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_41/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_41/statuses/7a4bc785c8bbe1e7d30a5dfe1dbb3af630a48f85"}}}}
{"actor":{"display_login":"tranducquoc"}}