{"action":"created","comment":{"url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/comments/344531507","pull_request_review_id":314660490,"id":344531507,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NDUzMTUwNw==","diff_hunk":"@@ -0,0 +1,27 @@\n+class HiringsController < ApplicationController\n+  before_action :logged_in_user, only: %i(new create)\n+\n+  def new\n+    @hiring = Hiring.new\n+    @vehicle_id = params[:vehicle_id]\n+  end\n+\n+  def create\n+    @hiring = Hiring.new hiring_params\n+    vehicle = @hiring.vehicle\n+\n+    if @hiring.save\n+      vehicle.update_columns quantity: vehicle.quantity - 1","path":"app/controllers/hirings_controller.rb","position":14,"original_position":14,"commit_id":"79c0e9e13447f41dbbe6302f88168ecd8cdb6296","original_commit_id":"79c0e9e13447f41dbbe6302f88168ecd8cdb6296","user":{"login":"hungct-1121","id":49508133,"node_id":"MDQ6VXNlcjQ5NTA4MTMz","avatar_url":"https://avatars1.githubusercontent.com/u/49508133?v=4","gravatar_id":"","url":"https://api.github.com/users/hungct-1121","html_url":"https://github.com/hungct-1121","followers_url":"https://api.github.com/users/hungct-1121/followers","following_url":"https://api.github.com/users/hungct-1121/following{/other_user}","gists_url":"https://api.github.com/users/hungct-1121/gists{/gist_id}","starred_url":"https://api.github.com/users/hungct-1121/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hungct-1121/subscriptions","organizations_url":"https://api.github.com/users/hungct-1121/orgs","repos_url":"https://api.github.com/users/hungct-1121/repos","events_url":"https://api.github.com/users/hungct-1121/events{/privacy}","received_events_url":"https://api.github.com/users/hungct-1121/received_events","type":"User","site_admin":false},"body":"cho code nó ngắn hơn :v","created_at":"2019-11-11T01:29:36Z","updated_at":"2019-11-11T01:30:06Z","html_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9#discussion_r344531507","pull_request_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/comments/344531507"},"html":{"href":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9#discussion_r344531507"},"pull_request":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9"}},"in_reply_to_id":344531278},"pull_request":{"url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9","id":339176662,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM5MTc2NjYy","html_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9","diff_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9.diff","patch_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9.patch","issue_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/9","number":9,"state":"open","locked":false,"title":"Basic Order Vehicle","user":{"login":"gdhaison","id":42487047,"node_id":"MDQ6VXNlcjQyNDg3MDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/42487047?v=4","gravatar_id":"","url":"https://api.github.com/users/gdhaison","html_url":"https://github.com/gdhaison","followers_url":"https://api.github.com/users/gdhaison/followers","following_url":"https://api.github.com/users/gdhaison/following{/other_user}","gists_url":"https://api.github.com/users/gdhaison/gists{/gist_id}","starred_url":"https://api.github.com/users/gdhaison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdhaison/subscriptions","organizations_url":"https://api.github.com/users/gdhaison/orgs","repos_url":"https://api.github.com/users/gdhaison/repos","events_url":"https://api.github.com/users/gdhaison/events{/privacy}","received_events_url":"https://api.github.com/users/gdhaison/received_events","type":"User","site_admin":false},"body":"===> Title: Basic Order Vehicle\r\n\r\n===> Redmine ticket: https://edu-redmine.sun-asterisk.vn/issues/19176\r\n\r\n===> Attachment files: \r\n![Screenshot from 2019-11-11 01-23-18](https://user-images.githubusercontent.com/42487047/68548685-3acaf480-0422-11ea-9262-31a320035b33.png)\r\n\r\n","created_at":"2019-11-10T18:26:11Z","updated_at":"2019-11-11T01:30:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f57ef693022897cf5e3dd0b721dba97dd3a8d4a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9/commits","review_comments_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9/comments","review_comment_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/9/comments","statuses_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/statuses/79c0e9e13447f41dbbe6302f88168ecd8cdb6296","head":{"label":"gdhaison:hiring","ref":"hiring","sha":"79c0e9e13447f41dbbe6302f88168ecd8cdb6296","user":{"login":"gdhaison","id":42487047,"node_id":"MDQ6VXNlcjQyNDg3MDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/42487047?v=4","gravatar_id":"","url":"https://api.github.com/users/gdhaison","html_url":"https://github.com/gdhaison","followers_url":"https://api.github.com/users/gdhaison/followers","following_url":"https://api.github.com/users/gdhaison/following{/other_user}","gists_url":"https://api.github.com/users/gdhaison/gists{/gist_id}","starred_url":"https://api.github.com/users/gdhaison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdhaison/subscriptions","organizations_url":"https://api.github.com/users/gdhaison/orgs","repos_url":"https://api.github.com/users/gdhaison/repos","events_url":"https://api.github.com/users/gdhaison/events{/privacy}","received_events_url":"https://api.github.com/users/gdhaison/received_events","type":"User","site_admin":false},"repo":{"id":218670844,"node_id":"MDEwOlJlcG9zaXRvcnkyMTg2NzA4NDQ=","name":"open-ruby-2019-hiring-vehicles-store","full_name":"gdhaison/open-ruby-2019-hiring-vehicles-store","private":false,"owner":{"login":"gdhaison","id":42487047,"node_id":"MDQ6VXNlcjQyNDg3MDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/42487047?v=4","gravatar_id":"","url":"https://api.github.com/users/gdhaison","html_url":"https://github.com/gdhaison","followers_url":"https://api.github.com/users/gdhaison/followers","following_url":"https://api.github.com/users/gdhaison/following{/other_user}","gists_url":"https://api.github.com/users/gdhaison/gists{/gist_id}","starred_url":"https://api.github.com/users/gdhaison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdhaison/subscriptions","organizations_url":"https://api.github.com/users/gdhaison/orgs","repos_url":"https://api.github.com/users/gdhaison/repos","events_url":"https://api.github.com/users/gdhaison/events{/privacy}","received_events_url":"https://api.github.com/users/gdhaison/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gdhaison/open-ruby-2019-hiring-vehicles-store","description":null,"fork":true,"url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store","forks_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/forks","keys_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/teams","hooks_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/hooks","issue_events_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/issues/events{/number}","events_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/events","assignees_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/assignees{/user}","branches_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/branches{/branch}","tags_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/tags","blobs_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/statuses/{sha}","languages_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/languages","stargazers_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/stargazers","contributors_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/contributors","subscribers_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/subscribers","subscription_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/subscription","commits_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/contents/{+path}","compare_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/merges","archive_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/downloads","issues_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/issues{/number}","pulls_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/pulls{/number}","milestones_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/milestones{/number}","notifications_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/labels{/name}","releases_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/releases{/id}","deployments_url":"https://api.github.com/repos/gdhaison/open-ruby-2019-hiring-vehicles-store/deployments","created_at":"2019-10-31T02:47:32Z","updated_at":"2019-10-31T02:47:34Z","pushed_at":"2019-11-10T18:33:37Z","git_url":"git://github.com/gdhaison/open-ruby-2019-hiring-vehicles-store.git","ssh_url":"git@github.com:gdhaison/open-ruby-2019-hiring-vehicles-store.git","clone_url":"https://github.com/gdhaison/open-ruby-2019-hiring-vehicles-store.git","svn_url":"https://github.com/gdhaison/open-ruby-2019-hiring-vehicles-store","homepage":null,"size":961,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"awesome-academy:master","ref":"master","sha":"d454e38437fb33b5d22423a51850d4bdc4517b8f","user":{"login":"awesome-academy","id":33895223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODk1MjIz","avatar_url":"https://avatars0.githubusercontent.com/u/33895223?v=4","gravatar_id":"","url":"https://api.github.com/users/awesome-academy","html_url":"https://github.com/awesome-academy","followers_url":"https://api.github.com/users/awesome-academy/followers","following_url":"https://api.github.com/users/awesome-academy/following{/other_user}","gists_url":"https://api.github.com/users/awesome-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/awesome-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesome-academy/subscriptions","organizations_url":"https://api.github.com/users/awesome-academy/orgs","repos_url":"https://api.github.com/users/awesome-academy/repos","events_url":"https://api.github.com/users/awesome-academy/events{/privacy}","received_events_url":"https://api.github.com/users/awesome-academy/received_events","type":"Organization","site_admin":false},"repo":{"id":218434170,"node_id":"MDEwOlJlcG9zaXRvcnkyMTg0MzQxNzA=","name":"open-ruby-2019-hiring-vehicles-store","full_name":"awesome-academy/open-ruby-2019-hiring-vehicles-store","private":false,"owner":{"login":"awesome-academy","id":33895223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODk1MjIz","avatar_url":"https://avatars0.githubusercontent.com/u/33895223?v=4","gravatar_id":"","url":"https://api.github.com/users/awesome-academy","html_url":"https://github.com/awesome-academy","followers_url":"https://api.github.com/users/awesome-academy/followers","following_url":"https://api.github.com/users/awesome-academy/following{/other_user}","gists_url":"https://api.github.com/users/awesome-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/awesome-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesome-academy/subscriptions","organizations_url":"https://api.github.com/users/awesome-academy/orgs","repos_url":"https://api.github.com/users/awesome-academy/repos","events_url":"https://api.github.com/users/awesome-academy/events{/privacy}","received_events_url":"https://api.github.com/users/awesome-academy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store","description":null,"fork":false,"url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store","forks_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/forks","keys_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/teams","hooks_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/hooks","issue_events_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/events{/number}","events_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/events","assignees_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/assignees{/user}","branches_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/branches{/branch}","tags_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/tags","blobs_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/statuses/{sha}","languages_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/languages","stargazers_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/stargazers","contributors_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/contributors","subscribers_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/subscribers","subscription_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/subscription","commits_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/contents/{+path}","compare_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/merges","archive_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/downloads","issues_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues{/number}","pulls_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls{/number}","milestones_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/milestones{/number}","notifications_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/labels{/name}","releases_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/releases{/id}","deployments_url":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/deployments","created_at":"2019-10-30T03:17:10Z","updated_at":"2019-11-09T14:35:14Z","pushed_at":"2019-11-10T18:33:39Z","git_url":"git://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store.git","ssh_url":"git@github.com:awesome-academy/open-ruby-2019-hiring-vehicles-store.git","clone_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store.git","svn_url":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store","homepage":null,"size":959,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9"},"html":{"href":"https://github.com/awesome-academy/open-ruby-2019-hiring-vehicles-store/pull/9"},"issue":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/9"},"comments":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/awesome-academy/open-ruby-2019-hiring-vehicles-store/statuses/79c0e9e13447f41dbbe6302f88168ecd8cdb6296"}},"author_association":"NONE"}}
{"actor":{"display_login":"hungct-1121"}}