{"action":"created","comment":{"url":"https://api.github.com/repos/andela/getmyshop/pulls/comments/59620810","id":59620810,"diff_hunk":"@@ -3,7 +3,7 @@ def index\n   end\n \n   def show\n-    @product = Product.find_by_id(params[:id])\n+    @product = Product.find_by_id(params[:id]).decorate","path":"app/controllers/products_controller.rb","position":5,"original_position":5,"commit_id":"a9d5eab5ca2ce7af0b8e57b80e1afd5edfdf3fc1","original_commit_id":"a9d5eab5ca2ce7af0b8e57b80e1afd5edfdf3fc1","user":{"login":"andela-bmakinwa","id":11521847,"avatar_url":"https://avatars.githubusercontent.com/u/11521847?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-bmakinwa","html_url":"https://github.com/andela-bmakinwa","followers_url":"https://api.github.com/users/andela-bmakinwa/followers","following_url":"https://api.github.com/users/andela-bmakinwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-bmakinwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-bmakinwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-bmakinwa/subscriptions","organizations_url":"https://api.github.com/users/andela-bmakinwa/orgs","repos_url":"https://api.github.com/users/andela-bmakinwa/repos","events_url":"https://api.github.com/users/andela-bmakinwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-bmakinwa/received_events","type":"User","site_admin":false},"body":"**Nitpick - Code Quality**\r\nYou should make use of the `find_by` method like so: `Product.find_by(params[:id]).decorate`","created_at":"2016-04-13T20:37:42Z","updated_at":"2016-04-13T20:37:42Z","html_url":"https://github.com/andela/getmyshop/pull/89#discussion_r59620810","pull_request_url":"https://api.github.com/repos/andela/getmyshop/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/comments/59620810"},"html":{"href":"https://github.com/andela/getmyshop/pull/89#discussion_r59620810"},"pull_request":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/andela/getmyshop/pulls/89","id":66326025,"html_url":"https://github.com/andela/getmyshop/pull/89","diff_url":"https://github.com/andela/getmyshop/pull/89.diff","patch_url":"https://github.com/andela/getmyshop/pull/89.patch","issue_url":"https://api.github.com/repos/andela/getmyshop/issues/89","number":89,"state":"open","locked":false,"title":"116031175 display number of products in stock","user":{"login":"andela-gogbara","id":5628767,"avatar_url":"https://avatars.githubusercontent.com/u/5628767?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-gogbara","html_url":"https://github.com/andela-gogbara","followers_url":"https://api.github.com/users/andela-gogbara/followers","following_url":"https://api.github.com/users/andela-gogbara/following{/other_user}","gists_url":"https://api.github.com/users/andela-gogbara/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-gogbara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-gogbara/subscriptions","organizations_url":"https://api.github.com/users/andela-gogbara/orgs","repos_url":"https://api.github.com/users/andela-gogbara/repos","events_url":"https://api.github.com/users/andela-gogbara/events{/privacy}","received_events_url":"https://api.github.com/users/andela-gogbara/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nIt allows users to see the quantity of product in stock.\r\n\r\n#### Description of Task to be completed?\r\nAdd a poros class that reduces the quantity of a product based on the quantity of the corresponding order item. \r\n\r\n#### How should this be manually tested?\r\nBy visiting a product page.\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n#116031175","created_at":"2016-04-13T14:00:28Z","updated_at":"2016-04-13T20:37:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c41274f83d28e51b29dd922bfae28ad8ab0c0d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andela/getmyshop/pulls/89/commits","review_comments_url":"https://api.github.com/repos/andela/getmyshop/pulls/89/comments","review_comment_url":"https://api.github.com/repos/andela/getmyshop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/getmyshop/issues/89/comments","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/a9d5eab5ca2ce7af0b8e57b80e1afd5edfdf3fc1","head":{"label":"andela:ft-number-of-products-in-stock-116031175","ref":"ft-number-of-products-in-stock-116031175","sha":"a9d5eab5ca2ce7af0b8e57b80e1afd5edfdf3fc1","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":45830862,"name":"getmyshop","full_name":"andela/getmyshop","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/getmyshop","description":"Online shop for rent","fork":false,"url":"https://api.github.com/repos/andela/getmyshop","forks_url":"https://api.github.com/repos/andela/getmyshop/forks","keys_url":"https://api.github.com/repos/andela/getmyshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/getmyshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/getmyshop/teams","hooks_url":"https://api.github.com/repos/andela/getmyshop/hooks","issue_events_url":"https://api.github.com/repos/andela/getmyshop/issues/events{/number}","events_url":"https://api.github.com/repos/andela/getmyshop/events","assignees_url":"https://api.github.com/repos/andela/getmyshop/assignees{/user}","branches_url":"https://api.github.com/repos/andela/getmyshop/branches{/branch}","tags_url":"https://api.github.com/repos/andela/getmyshop/tags","blobs_url":"https://api.github.com/repos/andela/getmyshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/getmyshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/getmyshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/getmyshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/getmyshop/languages","stargazers_url":"https://api.github.com/repos/andela/getmyshop/stargazers","contributors_url":"https://api.github.com/repos/andela/getmyshop/contributors","subscribers_url":"https://api.github.com/repos/andela/getmyshop/subscribers","subscription_url":"https://api.github.com/repos/andela/getmyshop/subscription","commits_url":"https://api.github.com/repos/andela/getmyshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/getmyshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/getmyshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/getmyshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/getmyshop/contents/{+path}","compare_url":"https://api.github.com/repos/andela/getmyshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/getmyshop/merges","archive_url":"https://api.github.com/repos/andela/getmyshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/getmyshop/downloads","issues_url":"https://api.github.com/repos/andela/getmyshop/issues{/number}","pulls_url":"https://api.github.com/repos/andela/getmyshop/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/getmyshop/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/getmyshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/getmyshop/labels{/name}","releases_url":"https://api.github.com/repos/andela/getmyshop/releases{/id}","deployments_url":"https://api.github.com/repos/andela/getmyshop/deployments","created_at":"2015-11-09T10:22:52Z","updated_at":"2016-04-05T09:30:21Z","pushed_at":"2016-04-13T15:17:19Z","git_url":"git://github.com/andela/getmyshop.git","ssh_url":"git@github.com:andela/getmyshop.git","clone_url":"https://github.com/andela/getmyshop.git","svn_url":"https://github.com/andela/getmyshop","homepage":"http://getmyshop-staging.herokuapp.com","size":1323,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"andela:master","ref":"master","sha":"49f26e432501f3822ce05b439c674f5e0893be2e","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":45830862,"name":"getmyshop","full_name":"andela/getmyshop","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/getmyshop","description":"Online shop for rent","fork":false,"url":"https://api.github.com/repos/andela/getmyshop","forks_url":"https://api.github.com/repos/andela/getmyshop/forks","keys_url":"https://api.github.com/repos/andela/getmyshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/getmyshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/getmyshop/teams","hooks_url":"https://api.github.com/repos/andela/getmyshop/hooks","issue_events_url":"https://api.github.com/repos/andela/getmyshop/issues/events{/number}","events_url":"https://api.github.com/repos/andela/getmyshop/events","assignees_url":"https://api.github.com/repos/andela/getmyshop/assignees{/user}","branches_url":"https://api.github.com/repos/andela/getmyshop/branches{/branch}","tags_url":"https://api.github.com/repos/andela/getmyshop/tags","blobs_url":"https://api.github.com/repos/andela/getmyshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/getmyshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/getmyshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/getmyshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/getmyshop/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/getmyshop/languages","stargazers_url":"https://api.github.com/repos/andela/getmyshop/stargazers","contributors_url":"https://api.github.com/repos/andela/getmyshop/contributors","subscribers_url":"https://api.github.com/repos/andela/getmyshop/subscribers","subscription_url":"https://api.github.com/repos/andela/getmyshop/subscription","commits_url":"https://api.github.com/repos/andela/getmyshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/getmyshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/getmyshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/getmyshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/getmyshop/contents/{+path}","compare_url":"https://api.github.com/repos/andela/getmyshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/getmyshop/merges","archive_url":"https://api.github.com/repos/andela/getmyshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/getmyshop/downloads","issues_url":"https://api.github.com/repos/andela/getmyshop/issues{/number}","pulls_url":"https://api.github.com/repos/andela/getmyshop/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/getmyshop/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/getmyshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/getmyshop/labels{/name}","releases_url":"https://api.github.com/repos/andela/getmyshop/releases{/id}","deployments_url":"https://api.github.com/repos/andela/getmyshop/deployments","created_at":"2015-11-09T10:22:52Z","updated_at":"2016-04-05T09:30:21Z","pushed_at":"2016-04-13T15:17:19Z","git_url":"git://github.com/andela/getmyshop.git","ssh_url":"git@github.com:andela/getmyshop.git","clone_url":"https://github.com/andela/getmyshop.git","svn_url":"https://github.com/andela/getmyshop","homepage":"http://getmyshop-staging.herokuapp.com","size":1323,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/89"},"html":{"href":"https://github.com/andela/getmyshop/pull/89"},"issue":{"href":"https://api.github.com/repos/andela/getmyshop/issues/89"},"comments":{"href":"https://api.github.com/repos/andela/getmyshop/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/getmyshop/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/andela/getmyshop/statuses/a9d5eab5ca2ce7af0b8e57b80e1afd5edfdf3fc1"}}}}