{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C6/betsy/pulls/comments/86710889","pull_request_review_id":6358123,"id":86710889,"diff_hunk":"@@ -0,0 +1,94 @@\n+class OrderProductsController < ApplicationController\n+  before_action :find_order_product, except: [:index, :new, :create]\n+\n+  def index\n+    @order_products = OrderProduct.all\n+  end\n+\n+  def show\n+  end\n+\n+  def new\n+    @order_product = OrderProduct.new\n+  end\n+\n+  def create\n+    find_cart\n+\n+    already_in = false\n+\n+    @order.order_products.each do |order_product|\n+      if order_product.product_id.to_i == params[:order_products][:id].to_i\n+        already_in = true\n+        @order_product = OrderProduct.find(order_product.id)\n+        @order_product.save","path":"app/controllers/order_products_controller.rb","position":24,"original_position":24,"commit_id":"d567acf1a21f9c6162e6764cbba40ce619f4b02f","original_commit_id":"d567acf1a21f9c6162e6764cbba40ce619f4b02f","user":{"login":"CheezItMan","id":1177416,"avatar_url":"https://avatars.githubusercontent.com/u/1177416?v=3","gravatar_id":"","url":"https://api.github.com/users/CheezItMan","html_url":"https://github.com/CheezItMan","followers_url":"https://api.github.com/users/CheezItMan/followers","following_url":"https://api.github.com/users/CheezItMan/following{/other_user}","gists_url":"https://api.github.com/users/CheezItMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CheezItMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheezItMan/subscriptions","organizations_url":"https://api.github.com/users/CheezItMan/orgs","repos_url":"https://api.github.com/users/CheezItMan/repos","events_url":"https://api.github.com/users/CheezItMan/events{/privacy}","received_events_url":"https://api.github.com/users/CheezItMan/received_events","type":"User","site_admin":false},"body":"You find an order_product and then save it to the database without changing anything here.  ","created_at":"2016-11-07T04:01:33Z","updated_at":"2016-11-07T04:32:15Z","html_url":"https://github.com/Ada-C6/betsy/pull/39#discussion_r86710889","pull_request_url":"https://api.github.com/repos/Ada-C6/betsy/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/comments/86710889"},"html":{"href":"https://github.com/Ada-C6/betsy/pull/39#discussion_r86710889"},"pull_request":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C6/betsy/pulls/39","id":91462963,"html_url":"https://github.com/Ada-C6/betsy/pull/39","diff_url":"https://github.com/Ada-C6/betsy/pull/39.diff","patch_url":"https://github.com/Ada-C6/betsy/pull/39.patch","issue_url":"https://api.github.com/repos/Ada-C6/betsy/issues/39","number":39,"state":"open","locked":false,"title":"Beyoncy - Rachel, Lauren, Joanna, and Alyssa","user":{"login":"alyssahursh","id":15177211,"avatar_url":"https://avatars.githubusercontent.com/u/15177211?v=3","gravatar_id":"","url":"https://api.github.com/users/alyssahursh","html_url":"https://github.com/alyssahursh","followers_url":"https://api.github.com/users/alyssahursh/followers","following_url":"https://api.github.com/users/alyssahursh/following{/other_user}","gists_url":"https://api.github.com/users/alyssahursh/gists{/gist_id}","starred_url":"https://api.github.com/users/alyssahursh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alyssahursh/subscriptions","organizations_url":"https://api.github.com/users/alyssahursh/orgs","repos_url":"https://api.github.com/users/alyssahursh/repos","events_url":"https://api.github.com/users/alyssahursh/events{/privacy}","received_events_url":"https://api.github.com/users/alyssahursh/received_events","type":"User","site_admin":false},"body":"@CheezItMan \nRachel, Lauren, Joanna, and Alyssa\n","created_at":"2016-10-28T22:31:39Z","updated_at":"2016-11-07T04:32:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f181c70941008c352423e7eb9b6aca33bd3b796","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C6/betsy/pulls/39/commits","review_comments_url":"https://api.github.com/repos/Ada-C6/betsy/pulls/39/comments","review_comment_url":"https://api.github.com/repos/Ada-C6/betsy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C6/betsy/issues/39/comments","statuses_url":"https://api.github.com/repos/Ada-C6/betsy/statuses/d567acf1a21f9c6162e6764cbba40ce619f4b02f","head":{"label":"rpavilanis:master","ref":"master","sha":"d567acf1a21f9c6162e6764cbba40ce619f4b02f","user":{"login":"rpavilanis","id":15220180,"avatar_url":"https://avatars.githubusercontent.com/u/15220180?v=3","gravatar_id":"","url":"https://api.github.com/users/rpavilanis","html_url":"https://github.com/rpavilanis","followers_url":"https://api.github.com/users/rpavilanis/followers","following_url":"https://api.github.com/users/rpavilanis/following{/other_user}","gists_url":"https://api.github.com/users/rpavilanis/gists{/gist_id}","starred_url":"https://api.github.com/users/rpavilanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpavilanis/subscriptions","organizations_url":"https://api.github.com/users/rpavilanis/orgs","repos_url":"https://api.github.com/users/rpavilanis/repos","events_url":"https://api.github.com/users/rpavilanis/events{/privacy}","received_events_url":"https://api.github.com/users/rpavilanis/received_events","type":"User","site_admin":false},"repo":{"id":71187290,"name":"betsy","full_name":"rpavilanis/betsy","owner":{"login":"rpavilanis","id":15220180,"avatar_url":"https://avatars.githubusercontent.com/u/15220180?v=3","gravatar_id":"","url":"https://api.github.com/users/rpavilanis","html_url":"https://github.com/rpavilanis","followers_url":"https://api.github.com/users/rpavilanis/followers","following_url":"https://api.github.com/users/rpavilanis/following{/other_user}","gists_url":"https://api.github.com/users/rpavilanis/gists{/gist_id}","starred_url":"https://api.github.com/users/rpavilanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpavilanis/subscriptions","organizations_url":"https://api.github.com/users/rpavilanis/orgs","repos_url":"https://api.github.com/users/rpavilanis/repos","events_url":"https://api.github.com/users/rpavilanis/events{/privacy}","received_events_url":"https://api.github.com/users/rpavilanis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rpavilanis/betsy","description":null,"fork":true,"url":"https://api.github.com/repos/rpavilanis/betsy","forks_url":"https://api.github.com/repos/rpavilanis/betsy/forks","keys_url":"https://api.github.com/repos/rpavilanis/betsy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpavilanis/betsy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpavilanis/betsy/teams","hooks_url":"https://api.github.com/repos/rpavilanis/betsy/hooks","issue_events_url":"https://api.github.com/repos/rpavilanis/betsy/issues/events{/number}","events_url":"https://api.github.com/repos/rpavilanis/betsy/events","assignees_url":"https://api.github.com/repos/rpavilanis/betsy/assignees{/user}","branches_url":"https://api.github.com/repos/rpavilanis/betsy/branches{/branch}","tags_url":"https://api.github.com/repos/rpavilanis/betsy/tags","blobs_url":"https://api.github.com/repos/rpavilanis/betsy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpavilanis/betsy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpavilanis/betsy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpavilanis/betsy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpavilanis/betsy/statuses/{sha}","languages_url":"https://api.github.com/repos/rpavilanis/betsy/languages","stargazers_url":"https://api.github.com/repos/rpavilanis/betsy/stargazers","contributors_url":"https://api.github.com/repos/rpavilanis/betsy/contributors","subscribers_url":"https://api.github.com/repos/rpavilanis/betsy/subscribers","subscription_url":"https://api.github.com/repos/rpavilanis/betsy/subscription","commits_url":"https://api.github.com/repos/rpavilanis/betsy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpavilanis/betsy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpavilanis/betsy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpavilanis/betsy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpavilanis/betsy/contents/{+path}","compare_url":"https://api.github.com/repos/rpavilanis/betsy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpavilanis/betsy/merges","archive_url":"https://api.github.com/repos/rpavilanis/betsy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpavilanis/betsy/downloads","issues_url":"https://api.github.com/repos/rpavilanis/betsy/issues{/number}","pulls_url":"https://api.github.com/repos/rpavilanis/betsy/pulls{/number}","milestones_url":"https://api.github.com/repos/rpavilanis/betsy/milestones{/number}","notifications_url":"https://api.github.com/repos/rpavilanis/betsy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpavilanis/betsy/labels{/name}","releases_url":"https://api.github.com/repos/rpavilanis/betsy/releases{/id}","deployments_url":"https://api.github.com/repos/rpavilanis/betsy/deployments","created_at":"2016-10-17T22:41:46Z","updated_at":"2016-10-28T22:30:24Z","pushed_at":"2016-10-28T22:30:22Z","git_url":"git://github.com/rpavilanis/betsy.git","ssh_url":"git@github.com:rpavilanis/betsy.git","clone_url":"https://github.com/rpavilanis/betsy.git","svn_url":"https://github.com/rpavilanis/betsy","homepage":null,"size":4160,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"Ada-C6:master","ref":"master","sha":"270dea81b53a1e36299588eb1d87c2880e4c0807","user":{"login":"Ada-C6","id":20429248,"avatar_url":"https://avatars.githubusercontent.com/u/20429248?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-C6","html_url":"https://github.com/Ada-C6","followers_url":"https://api.github.com/users/Ada-C6/followers","following_url":"https://api.github.com/users/Ada-C6/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C6/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C6/subscriptions","organizations_url":"https://api.github.com/users/Ada-C6/orgs","repos_url":"https://api.github.com/users/Ada-C6/repos","events_url":"https://api.github.com/users/Ada-C6/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C6/received_events","type":"Organization","site_admin":false},"repo":{"id":71184262,"name":"betsy","full_name":"Ada-C6/betsy","owner":{"login":"Ada-C6","id":20429248,"avatar_url":"https://avatars.githubusercontent.com/u/20429248?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-C6","html_url":"https://github.com/Ada-C6","followers_url":"https://api.github.com/users/Ada-C6/followers","following_url":"https://api.github.com/users/Ada-C6/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C6/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C6/subscriptions","organizations_url":"https://api.github.com/users/Ada-C6/orgs","repos_url":"https://api.github.com/users/Ada-C6/repos","events_url":"https://api.github.com/users/Ada-C6/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C6/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-C6/betsy","description":null,"fork":true,"url":"https://api.github.com/repos/Ada-C6/betsy","forks_url":"https://api.github.com/repos/Ada-C6/betsy/forks","keys_url":"https://api.github.com/repos/Ada-C6/betsy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C6/betsy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C6/betsy/teams","hooks_url":"https://api.github.com/repos/Ada-C6/betsy/hooks","issue_events_url":"https://api.github.com/repos/Ada-C6/betsy/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C6/betsy/events","assignees_url":"https://api.github.com/repos/Ada-C6/betsy/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C6/betsy/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C6/betsy/tags","blobs_url":"https://api.github.com/repos/Ada-C6/betsy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C6/betsy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C6/betsy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C6/betsy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C6/betsy/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C6/betsy/languages","stargazers_url":"https://api.github.com/repos/Ada-C6/betsy/stargazers","contributors_url":"https://api.github.com/repos/Ada-C6/betsy/contributors","subscribers_url":"https://api.github.com/repos/Ada-C6/betsy/subscribers","subscription_url":"https://api.github.com/repos/Ada-C6/betsy/subscription","commits_url":"https://api.github.com/repos/Ada-C6/betsy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C6/betsy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C6/betsy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C6/betsy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C6/betsy/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C6/betsy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C6/betsy/merges","archive_url":"https://api.github.com/repos/Ada-C6/betsy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C6/betsy/downloads","issues_url":"https://api.github.com/repos/Ada-C6/betsy/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C6/betsy/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C6/betsy/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C6/betsy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C6/betsy/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C6/betsy/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C6/betsy/deployments","created_at":"2016-10-17T21:50:33Z","updated_at":"2016-10-25T05:58:14Z","pushed_at":"2016-10-31T07:10:58Z","git_url":"git://github.com/Ada-C6/betsy.git","ssh_url":"git@github.com:Ada-C6/betsy.git","clone_url":"https://github.com/Ada-C6/betsy.git","svn_url":"https://github.com/Ada-C6/betsy","homepage":null,"size":26,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":15,"forks":15,"open_issues":15,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/39"},"html":{"href":"https://github.com/Ada-C6/betsy/pull/39"},"issue":{"href":"https://api.github.com/repos/Ada-C6/betsy/issues/39"},"comments":{"href":"https://api.github.com/repos/Ada-C6/betsy/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C6/betsy/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C6/betsy/statuses/d567acf1a21f9c6162e6764cbba40ce619f4b02f"}}}}
{"actor":{"display_login":"CheezItMan"}}