{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_16/pulls/comments/36382409","id":36382409,"diff_hunk":"@@ -0,0 +1,30 @@\n+class RequestsController < ApplicationController\n+  layout false\n+\n+  def new\n+    @request = Request.new\n+  end\n+\n+  def create\n+    @request = Request.new request_params\n+    @request.user = current_user\n+    if @request.save\n+      respond_to do |format|\n+        format.html {redirect_to root_path}\n+        format.json {render json: {status: \"success\",\n+          message: t(\"application.flash.request_sent\")}}\n+      end\n+    else\n+      respond_to do |format|\n+        format.html {render :new}\n+        format.json {render json: {status: \"failed\",\n+          data: @request.errors.full_messages}}\n+      end\n+    end\n+  end\n+\n+  private\n+  def request_params\n+    params.require(:request).permit :book_title, :author","path":"app/controllers/requests_controller.rb","position":28,"original_position":28,"commit_id":"d641a7a294ee84d6fee2f51d034a8973935749b7","original_commit_id":"d641a7a294ee84d6fee2f51d034a8973935749b7","user":{"login":"ThuBM","id":5279620,"avatar_url":"https://avatars.githubusercontent.com/u/5279620?v=3","gravatar_id":"","url":"https://api.github.com/users/ThuBM","html_url":"https://github.com/ThuBM","followers_url":"https://api.github.com/users/ThuBM/followers","following_url":"https://api.github.com/users/ThuBM/following{/other_user}","gists_url":"https://api.github.com/users/ThuBM/gists{/gist_id}","starred_url":"https://api.github.com/users/ThuBM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThuBM/subscriptions","organizations_url":"https://api.github.com/users/ThuBM/orgs","repos_url":"https://api.github.com/users/ThuBM/repos","events_url":"https://api.github.com/users/ThuBM/events{/privacy}","received_events_url":"https://api.github.com/users/ThuBM/received_events","type":"User","site_admin":false},"body":"request có :author không ?","created_at":"2015-08-06T05:31:15Z","updated_at":"2015-08-06T05:31:15Z","html_url":"https://github.com/framgia/brs_16/pull/6#discussion_r36382409","pull_request_url":"https://api.github.com/repos/framgia/brs_16/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/comments/36382409"},"html":{"href":"https://github.com/framgia/brs_16/pull/6#discussion_r36382409"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_16/pulls/6","id":41745734,"html_url":"https://github.com/framgia/brs_16/pull/6","diff_url":"https://github.com/framgia/brs_16/pull/6.diff","patch_url":"https://github.com/framgia/brs_16/pull/6.patch","issue_url":"https://api.github.com/repos/framgia/brs_16/issues/6","number":6,"state":"open","locked":false,"title":"#36659_send_book_requests","user":{"login":"trinhducduy","id":13133019,"avatar_url":"https://avatars.githubusercontent.com/u/13133019?v=3","gravatar_id":"","url":"https://api.github.com/users/trinhducduy","html_url":"https://github.com/trinhducduy","followers_url":"https://api.github.com/users/trinhducduy/followers","following_url":"https://api.github.com/users/trinhducduy/following{/other_user}","gists_url":"https://api.github.com/users/trinhducduy/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhducduy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhducduy/subscriptions","organizations_url":"https://api.github.com/users/trinhducduy/orgs","repos_url":"https://api.github.com/users/trinhducduy/repos","events_url":"https://api.github.com/users/trinhducduy/events{/privacy}","received_events_url":"https://api.github.com/users/trinhducduy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-06T02:09:29Z","updated_at":"2015-08-06T05:31:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d164618f5129db3123185fde3d36cb1b88b8157","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_16/pulls/6/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_16/pulls/6/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_16/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_16/issues/6/comments","statuses_url":"https://api.github.com/repos/framgia/brs_16/statuses/d641a7a294ee84d6fee2f51d034a8973935749b7","head":{"label":"trinhducduy:feature/send_book_requests","ref":"feature/send_book_requests","sha":"d641a7a294ee84d6fee2f51d034a8973935749b7","user":{"login":"trinhducduy","id":13133019,"avatar_url":"https://avatars.githubusercontent.com/u/13133019?v=3","gravatar_id":"","url":"https://api.github.com/users/trinhducduy","html_url":"https://github.com/trinhducduy","followers_url":"https://api.github.com/users/trinhducduy/followers","following_url":"https://api.github.com/users/trinhducduy/following{/other_user}","gists_url":"https://api.github.com/users/trinhducduy/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhducduy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhducduy/subscriptions","organizations_url":"https://api.github.com/users/trinhducduy/orgs","repos_url":"https://api.github.com/users/trinhducduy/repos","events_url":"https://api.github.com/users/trinhducduy/events{/privacy}","received_events_url":"https://api.github.com/users/trinhducduy/received_events","type":"User","site_admin":false},"repo":{"id":40176405,"name":"brs_16","full_name":"trinhducduy/brs_16","owner":{"login":"trinhducduy","id":13133019,"avatar_url":"https://avatars.githubusercontent.com/u/13133019?v=3","gravatar_id":"","url":"https://api.github.com/users/trinhducduy","html_url":"https://github.com/trinhducduy","followers_url":"https://api.github.com/users/trinhducduy/followers","following_url":"https://api.github.com/users/trinhducduy/following{/other_user}","gists_url":"https://api.github.com/users/trinhducduy/gists{/gist_id}","starred_url":"https://api.github.com/users/trinhducduy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinhducduy/subscriptions","organizations_url":"https://api.github.com/users/trinhducduy/orgs","repos_url":"https://api.github.com/users/trinhducduy/repos","events_url":"https://api.github.com/users/trinhducduy/events{/privacy}","received_events_url":"https://api.github.com/users/trinhducduy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trinhducduy/brs_16","description":"Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/trinhducduy/brs_16","forks_url":"https://api.github.com/repos/trinhducduy/brs_16/forks","keys_url":"https://api.github.com/repos/trinhducduy/brs_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trinhducduy/brs_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trinhducduy/brs_16/teams","hooks_url":"https://api.github.com/repos/trinhducduy/brs_16/hooks","issue_events_url":"https://api.github.com/repos/trinhducduy/brs_16/issues/events{/number}","events_url":"https://api.github.com/repos/trinhducduy/brs_16/events","assignees_url":"https://api.github.com/repos/trinhducduy/brs_16/assignees{/user}","branches_url":"https://api.github.com/repos/trinhducduy/brs_16/branches{/branch}","tags_url":"https://api.github.com/repos/trinhducduy/brs_16/tags","blobs_url":"https://api.github.com/repos/trinhducduy/brs_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trinhducduy/brs_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trinhducduy/brs_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/trinhducduy/brs_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trinhducduy/brs_16/statuses/{sha}","languages_url":"https://api.github.com/repos/trinhducduy/brs_16/languages","stargazers_url":"https://api.github.com/repos/trinhducduy/brs_16/stargazers","contributors_url":"https://api.github.com/repos/trinhducduy/brs_16/contributors","subscribers_url":"https://api.github.com/repos/trinhducduy/brs_16/subscribers","subscription_url":"https://api.github.com/repos/trinhducduy/brs_16/subscription","commits_url":"https://api.github.com/repos/trinhducduy/brs_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/trinhducduy/brs_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/trinhducduy/brs_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/trinhducduy/brs_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/trinhducduy/brs_16/contents/{+path}","compare_url":"https://api.github.com/repos/trinhducduy/brs_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trinhducduy/brs_16/merges","archive_url":"https://api.github.com/repos/trinhducduy/brs_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trinhducduy/brs_16/downloads","issues_url":"https://api.github.com/repos/trinhducduy/brs_16/issues{/number}","pulls_url":"https://api.github.com/repos/trinhducduy/brs_16/pulls{/number}","milestones_url":"https://api.github.com/repos/trinhducduy/brs_16/milestones{/number}","notifications_url":"https://api.github.com/repos/trinhducduy/brs_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trinhducduy/brs_16/labels{/name}","releases_url":"https://api.github.com/repos/trinhducduy/brs_16/releases{/id}","created_at":"2015-08-04T09:45:34Z","updated_at":"2015-08-04T09:31:59Z","pushed_at":"2015-08-06T04:34:53Z","git_url":"git://github.com/trinhducduy/brs_16.git","ssh_url":"git@github.com:trinhducduy/brs_16.git","clone_url":"https://github.com/trinhducduy/brs_16.git","svn_url":"https://github.com/trinhducduy/brs_16","homepage":null,"size":146,"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":"0b71ca0add525aac2c94f5994cf2db691cd1ff31","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":40175714,"name":"brs_16","full_name":"framgia/brs_16","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_16","description":"Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_16","forks_url":"https://api.github.com/repos/framgia/brs_16/forks","keys_url":"https://api.github.com/repos/framgia/brs_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_16/teams","hooks_url":"https://api.github.com/repos/framgia/brs_16/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_16/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_16/events","assignees_url":"https://api.github.com/repos/framgia/brs_16/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_16/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_16/tags","blobs_url":"https://api.github.com/repos/framgia/brs_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_16/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_16/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_16/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_16/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_16/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_16/subscription","commits_url":"https://api.github.com/repos/framgia/brs_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_16/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_16/merges","archive_url":"https://api.github.com/repos/framgia/brs_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_16/downloads","issues_url":"https://api.github.com/repos/framgia/brs_16/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_16/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_16/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_16/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_16/releases{/id}","created_at":"2015-08-04T09:31:59Z","updated_at":"2015-08-04T09:31:59Z","pushed_at":"2015-08-06T04:52:39Z","git_url":"git://github.com/framgia/brs_16.git","ssh_url":"git@github.com:framgia/brs_16.git","clone_url":"https://github.com/framgia/brs_16.git","svn_url":"https://github.com/framgia/brs_16","homepage":null,"size":294,"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":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/6"},"html":{"href":"https://github.com/framgia/brs_16/pull/6"},"issue":{"href":"https://api.github.com/repos/framgia/brs_16/issues/6"},"comments":{"href":"https://api.github.com/repos/framgia/brs_16/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_16/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_16/statuses/d641a7a294ee84d6fee2f51d034a8973935749b7"}}}}