{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ishipper/pulls/comments/75420974","id":75420974,"diff_hunk":"@@ -21,4 +21,11 @@ def ensure_params_exist\n     render json: {message: I18n.t(\"api.missing_params\"), data: {}, code: 0},\n       status: 422 if missing_params\n   end\n+\n+  def find_object\n+    object = params[:controller].split('/').last.singularize\n+    var = instance_variable_set(\"@#{object}\", object.humanize.constantize.find_by_id(params[:id]))","path":"app/controllers/api/base_controller.rb","position":7,"original_position":7,"commit_id":"dc01d4ff13c1321efed2c0b0bcae0b3503f65c28","original_commit_id":"dc01d4ff13c1321efed2c0b0bcae0b3503f65c28","user":{"login":"hellovietnam93","id":8023606,"avatar_url":"https://avatars.githubusercontent.com/u/8023606?v=3","gravatar_id":"","url":"https://api.github.com/users/hellovietnam93","html_url":"https://github.com/hellovietnam93","followers_url":"https://api.github.com/users/hellovietnam93/followers","following_url":"https://api.github.com/users/hellovietnam93/following{/other_user}","gists_url":"https://api.github.com/users/hellovietnam93/gists{/gist_id}","starred_url":"https://api.github.com/users/hellovietnam93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellovietnam93/subscriptions","organizations_url":"https://api.github.com/users/hellovietnam93/orgs","repos_url":"https://api.github.com/users/hellovietnam93/repos","events_url":"https://api.github.com/users/hellovietnam93/events{/privacy}","received_events_url":"https://api.github.com/users/hellovietnam93/received_events","type":"User","site_admin":false},"body":"instance_variable_set \"@#{object}\", object.humanize.constantize.find_by_id(params[:id])","created_at":"2016-08-19T02:46:41Z","updated_at":"2016-08-19T02:46:41Z","html_url":"https://github.com/framgia/ishipper/pull/26#discussion_r75420974","pull_request_url":"https://api.github.com/repos/framgia/ishipper/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/comments/75420974"},"html":{"href":"https://github.com/framgia/ishipper/pull/26#discussion_r75420974"},"pull_request":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/ishipper/pulls/26","id":81745735,"html_url":"https://github.com/framgia/ishipper/pull/26","diff_url":"https://github.com/framgia/ishipper/pull/26.diff","patch_url":"https://github.com/framgia/ishipper/pull/26.patch","issue_url":"https://api.github.com/repos/framgia/ishipper/issues/26","number":26,"state":"open","locked":false,"title":"Invoice shipped request","user":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars.githubusercontent.com/u/19922459?v=3","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-18T01:55:28Z","updated_at":"2016-08-19T02:46:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cbf369a5916005896daaee6d3c191610f20168a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ishipper/pulls/26/commits","review_comments_url":"https://api.github.com/repos/framgia/ishipper/pulls/26/comments","review_comment_url":"https://api.github.com/repos/framgia/ishipper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ishipper/issues/26/comments","statuses_url":"https://api.github.com/repos/framgia/ishipper/statuses/dc01d4ff13c1321efed2c0b0bcae0b3503f65c28","head":{"label":"tiennh1995:invoice_shipped","ref":"invoice_shipped","sha":"dc01d4ff13c1321efed2c0b0bcae0b3503f65c28","user":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars.githubusercontent.com/u/19922459?v=3","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"repo":{"id":64729111,"name":"ishipper","full_name":"tiennh1995/ishipper","owner":{"login":"tiennh1995","id":19922459,"avatar_url":"https://avatars.githubusercontent.com/u/19922459?v=3","gravatar_id":"","url":"https://api.github.com/users/tiennh1995","html_url":"https://github.com/tiennh1995","followers_url":"https://api.github.com/users/tiennh1995/followers","following_url":"https://api.github.com/users/tiennh1995/following{/other_user}","gists_url":"https://api.github.com/users/tiennh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/tiennh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiennh1995/subscriptions","organizations_url":"https://api.github.com/users/tiennh1995/orgs","repos_url":"https://api.github.com/users/tiennh1995/repos","events_url":"https://api.github.com/users/tiennh1995/events{/privacy}","received_events_url":"https://api.github.com/users/tiennh1995/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiennh1995/ishipper","description":"iShipper","fork":true,"url":"https://api.github.com/repos/tiennh1995/ishipper","forks_url":"https://api.github.com/repos/tiennh1995/ishipper/forks","keys_url":"https://api.github.com/repos/tiennh1995/ishipper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiennh1995/ishipper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiennh1995/ishipper/teams","hooks_url":"https://api.github.com/repos/tiennh1995/ishipper/hooks","issue_events_url":"https://api.github.com/repos/tiennh1995/ishipper/issues/events{/number}","events_url":"https://api.github.com/repos/tiennh1995/ishipper/events","assignees_url":"https://api.github.com/repos/tiennh1995/ishipper/assignees{/user}","branches_url":"https://api.github.com/repos/tiennh1995/ishipper/branches{/branch}","tags_url":"https://api.github.com/repos/tiennh1995/ishipper/tags","blobs_url":"https://api.github.com/repos/tiennh1995/ishipper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiennh1995/ishipper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiennh1995/ishipper/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiennh1995/ishipper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiennh1995/ishipper/statuses/{sha}","languages_url":"https://api.github.com/repos/tiennh1995/ishipper/languages","stargazers_url":"https://api.github.com/repos/tiennh1995/ishipper/stargazers","contributors_url":"https://api.github.com/repos/tiennh1995/ishipper/contributors","subscribers_url":"https://api.github.com/repos/tiennh1995/ishipper/subscribers","subscription_url":"https://api.github.com/repos/tiennh1995/ishipper/subscription","commits_url":"https://api.github.com/repos/tiennh1995/ishipper/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiennh1995/ishipper/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiennh1995/ishipper/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiennh1995/ishipper/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiennh1995/ishipper/contents/{+path}","compare_url":"https://api.github.com/repos/tiennh1995/ishipper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiennh1995/ishipper/merges","archive_url":"https://api.github.com/repos/tiennh1995/ishipper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiennh1995/ishipper/downloads","issues_url":"https://api.github.com/repos/tiennh1995/ishipper/issues{/number}","pulls_url":"https://api.github.com/repos/tiennh1995/ishipper/pulls{/number}","milestones_url":"https://api.github.com/repos/tiennh1995/ishipper/milestones{/number}","notifications_url":"https://api.github.com/repos/tiennh1995/ishipper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiennh1995/ishipper/labels{/name}","releases_url":"https://api.github.com/repos/tiennh1995/ishipper/releases{/id}","deployments_url":"https://api.github.com/repos/tiennh1995/ishipper/deployments","created_at":"2016-08-02T06:09:19Z","updated_at":"2016-08-01T04:29:39Z","pushed_at":"2016-08-19T02:45:36Z","git_url":"git://github.com/tiennh1995/ishipper.git","ssh_url":"git@github.com:tiennh1995/ishipper.git","clone_url":"https://github.com/tiennh1995/ishipper.git","svn_url":"https://github.com/tiennh1995/ishipper","homepage":null,"size":79,"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":"c9ded952be549dac283256f609bb88a327927ffe","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":64635847,"name":"ishipper","full_name":"framgia/ishipper","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/ishipper","description":"iShipper","fork":false,"url":"https://api.github.com/repos/framgia/ishipper","forks_url":"https://api.github.com/repos/framgia/ishipper/forks","keys_url":"https://api.github.com/repos/framgia/ishipper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ishipper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ishipper/teams","hooks_url":"https://api.github.com/repos/framgia/ishipper/hooks","issue_events_url":"https://api.github.com/repos/framgia/ishipper/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ishipper/events","assignees_url":"https://api.github.com/repos/framgia/ishipper/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ishipper/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ishipper/tags","blobs_url":"https://api.github.com/repos/framgia/ishipper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ishipper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ishipper/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ishipper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ishipper/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ishipper/languages","stargazers_url":"https://api.github.com/repos/framgia/ishipper/stargazers","contributors_url":"https://api.github.com/repos/framgia/ishipper/contributors","subscribers_url":"https://api.github.com/repos/framgia/ishipper/subscribers","subscription_url":"https://api.github.com/repos/framgia/ishipper/subscription","commits_url":"https://api.github.com/repos/framgia/ishipper/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ishipper/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ishipper/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ishipper/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ishipper/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ishipper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ishipper/merges","archive_url":"https://api.github.com/repos/framgia/ishipper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ishipper/downloads","issues_url":"https://api.github.com/repos/framgia/ishipper/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ishipper/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ishipper/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ishipper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ishipper/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ishipper/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/ishipper/deployments","created_at":"2016-08-01T04:28:32Z","updated_at":"2016-08-05T03:03:05Z","pushed_at":"2016-08-19T02:45:36Z","git_url":"git://github.com/framgia/ishipper.git","ssh_url":"git@github.com:framgia/ishipper.git","clone_url":"https://github.com/framgia/ishipper.git","svn_url":"https://github.com/framgia/ishipper","homepage":null,"size":96,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/26"},"html":{"href":"https://github.com/framgia/ishipper/pull/26"},"issue":{"href":"https://api.github.com/repos/framgia/ishipper/issues/26"},"comments":{"href":"https://api.github.com/repos/framgia/ishipper/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ishipper/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ishipper/statuses/dc01d4ff13c1321efed2c0b0bcae0b3503f65c28"}}}}
{"actor":{"display_login":"hellovietnam93"}}