{"action":"created","comment":{"url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/comments/245282312","pull_request_review_id":189347328,"id":245282312,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTI4MjMxMg==","diff_hunk":"@@ -0,0 +1,26 @@\n+class ItemTransactionsController < ApplicationController\n+  before_action :set_item, only: [:new, :create]\n+  include Card\n+\n+  def new\n+    @item_transaction = ItemTransaction.new()\n+  end\n+\n+  def create\n+    @item_transaction = ItemTransaction.new(item_id: @item.id, user_id: current_user.id)\n+    price = @item.price\n+    charge(price)\n+      if @item_transaction.save\n+      # @sales_amount = SalesAmount.new(price: price * 0.9, limit_time: Date.today() + \"180\", user_id: @item.user_id)\n+      @item_transaction.item.update_attribute(:status, 1)","path":"app/controllers/item_transactions_controller.rb","position":15,"original_position":15,"commit_id":"b854a23758c5114676b7eaf984a1498fd752322f","original_commit_id":"b854a23758c5114676b7eaf984a1498fd752322f","user":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"body":"updateに変えると、このエラーが出ました。","created_at":"2019-01-04T12:11:32Z","updated_at":"2019-01-04T12:11:32Z","html_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69#discussion_r245282312","pull_request_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/comments/245282312"},"html":{"href":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69#discussion_r245282312"},"pull_request":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69"}},"in_reply_to_id":245272325},"pull_request":{"url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69","id":242202152,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMjAyMTUy","html_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69","diff_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69.diff","patch_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69.patch","issue_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/69","number":69,"state":"open","locked":false,"title":"Pay.jp","user":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"body":"WHAT \r\n商品購入のためのにItemTransactionという名前でルーティング、コントローラーとビューを作った。\r\nカード登録のためにCreditというコントローラーを作成した。\r\nテストはまだです。\r\n\r\nWHY \r\n商品購入ができるようにするため。","created_at":"2019-01-04T08:37:06Z","updated_at":"2019-01-04T12:11:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55413e5677e56fdb441bfe2b7f0e1f55f26e0a69","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69/commits","review_comments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69/comments","review_comment_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/69/comments","statuses_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/statuses/b854a23758c5114676b7eaf984a1498fd752322f","head":{"label":"kanchimatsumoto:pay.jp","ref":"pay.jp","sha":"b854a23758c5114676b7eaf984a1498fd752322f","user":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"repo":{"id":160453448,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA0NTM0NDg=","name":"freemarket_sample_40b","full_name":"kanchimatsumoto/freemarket_sample_40b","private":false,"owner":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b","description":"テックエキスパート40期生Bチームの最終課題のメルカリコピーアプリ","fork":false,"url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b","forks_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/forks","keys_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/teams","hooks_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/hooks","issue_events_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/events{/number}","events_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/events","assignees_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/assignees{/user}","branches_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/branches{/branch}","tags_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/tags","blobs_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/refs{/sha}","trees_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/statuses/{sha}","languages_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/languages","stargazers_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/stargazers","contributors_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/contributors","subscribers_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/subscribers","subscription_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/subscription","commits_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/commits{/sha}","git_commits_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/commits{/sha}","comments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/comments{/number}","issue_comment_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/comments{/number}","contents_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/contents/{+path}","compare_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/merges","archive_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/downloads","issues_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues{/number}","pulls_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls{/number}","milestones_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/milestones{/number}","notifications_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/labels{/name}","releases_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/releases{/id}","deployments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/deployments","created_at":"2018-12-05T03:12:59Z","updated_at":"2019-01-04T08:42:36Z","pushed_at":"2019-01-04T11:08:17Z","git_url":"git://github.com/kanchimatsumoto/freemarket_sample_40b.git","ssh_url":"git@github.com:kanchimatsumoto/freemarket_sample_40b.git","clone_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b.git","svn_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b","homepage":"","size":17793,"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":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kanchimatsumoto:master","ref":"master","sha":"76a7a96f5fc85224aaaded659ca0211e00094c69","user":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"repo":{"id":160453448,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA0NTM0NDg=","name":"freemarket_sample_40b","full_name":"kanchimatsumoto/freemarket_sample_40b","private":false,"owner":{"login":"kanchimatsumoto","id":42238927,"node_id":"MDQ6VXNlcjQyMjM4OTI3","avatar_url":"https://avatars3.githubusercontent.com/u/42238927?v=4","gravatar_id":"","url":"https://api.github.com/users/kanchimatsumoto","html_url":"https://github.com/kanchimatsumoto","followers_url":"https://api.github.com/users/kanchimatsumoto/followers","following_url":"https://api.github.com/users/kanchimatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/kanchimatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/kanchimatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanchimatsumoto/subscriptions","organizations_url":"https://api.github.com/users/kanchimatsumoto/orgs","repos_url":"https://api.github.com/users/kanchimatsumoto/repos","events_url":"https://api.github.com/users/kanchimatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/kanchimatsumoto/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b","description":"テックエキスパート40期生Bチームの最終課題のメルカリコピーアプリ","fork":false,"url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b","forks_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/forks","keys_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/teams","hooks_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/hooks","issue_events_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/events{/number}","events_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/events","assignees_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/assignees{/user}","branches_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/branches{/branch}","tags_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/tags","blobs_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/refs{/sha}","trees_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/statuses/{sha}","languages_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/languages","stargazers_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/stargazers","contributors_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/contributors","subscribers_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/subscribers","subscription_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/subscription","commits_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/commits{/sha}","git_commits_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/git/commits{/sha}","comments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/comments{/number}","issue_comment_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/comments{/number}","contents_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/contents/{+path}","compare_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/merges","archive_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/downloads","issues_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues{/number}","pulls_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls{/number}","milestones_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/milestones{/number}","notifications_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/labels{/name}","releases_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/releases{/id}","deployments_url":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/deployments","created_at":"2018-12-05T03:12:59Z","updated_at":"2019-01-04T08:42:36Z","pushed_at":"2019-01-04T11:08:17Z","git_url":"git://github.com/kanchimatsumoto/freemarket_sample_40b.git","ssh_url":"git@github.com:kanchimatsumoto/freemarket_sample_40b.git","clone_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b.git","svn_url":"https://github.com/kanchimatsumoto/freemarket_sample_40b","homepage":"","size":17793,"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":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69"},"html":{"href":"https://github.com/kanchimatsumoto/freemarket_sample_40b/pull/69"},"issue":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/69"},"comments":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/kanchimatsumoto/freemarket_sample_40b/statuses/b854a23758c5114676b7eaf984a1498fd752322f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kanchimatsumoto"}}