{"action":"created","comment":{"url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/comments/38271565","id":38271565,"diff_hunk":"@@ -1,49 +1,46 @@\n class CommentsController < ApplicationController\n-  before_action :set_comment, only: [:edit, :update, :destroy]\n-\n   def create\n-    # @comment = Comment.new(user: current_user, product: params[:id])\n-    @comment = Comment.new(comment_params)\n-\n+    @product = Product.find(params[:product_id])\n+    @comment = @product.comments.create(comment_params)\n+    @comment.user_id = current_user.id\n     if @comment.save\n-      respond_to do |format|\n-        format.html do\n-          redirect_to product_path(@comment.product_id), notice: 'Comment Created!'\n-        end\n-      end\n+      redirect_to @product, notice: 'Comment Created!'\n     else\n-      redirect_to product_path(@comment.product_id), notice: 'Something went wrong'\n+      redirect_to @product, notice: 'Something went wrong...'","path":"app/controllers/comments_controller.rb","position":20,"original_position":20,"commit_id":"4b4cc82cf585fc9d4f3fd2b02b533b209d007f14","original_commit_id":"4b4cc82cf585fc9d4f3fd2b02b533b209d007f14","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-08-30T13:21:30Z","updated_at":"2015-08-30T13:21:30Z","html_url":"https://github.com/RubyBursaRelsohod/team_project/pull/109#discussion_r38271565","pull_request_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/comments/38271565"},"html":{"href":"https://github.com/RubyBursaRelsohod/team_project/pull/109#discussion_r38271565"},"pull_request":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109","id":43713136,"html_url":"https://github.com/RubyBursaRelsohod/team_project/pull/109","diff_url":"https://github.com/RubyBursaRelsohod/team_project/pull/109.diff","patch_url":"https://github.com/RubyBursaRelsohod/team_project/pull/109.patch","issue_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/109","number":109,"state":"open","locked":false,"title":"Add comment removing functionality","user":{"login":"yakovenkodenis","id":8517673,"avatar_url":"https://avatars.githubusercontent.com/u/8517673?v=3","gravatar_id":"","url":"https://api.github.com/users/yakovenkodenis","html_url":"https://github.com/yakovenkodenis","followers_url":"https://api.github.com/users/yakovenkodenis/followers","following_url":"https://api.github.com/users/yakovenkodenis/following{/other_user}","gists_url":"https://api.github.com/users/yakovenkodenis/gists{/gist_id}","starred_url":"https://api.github.com/users/yakovenkodenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakovenkodenis/subscriptions","organizations_url":"https://api.github.com/users/yakovenkodenis/orgs","repos_url":"https://api.github.com/users/yakovenkodenis/repos","events_url":"https://api.github.com/users/yakovenkodenis/events{/privacy}","received_events_url":"https://api.github.com/users/yakovenkodenis/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-30T13:21:17Z","updated_at":"2015-08-30T13:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ffc3940f27da477b20b73ab1123f573627c8f32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109/commits","review_comments_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109/comments","review_comment_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/109/comments","statuses_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/statuses/4b4cc82cf585fc9d4f3fd2b02b533b209d007f14","head":{"label":"RubyBursaRelsohod:100_dyakovenko","ref":"100_dyakovenko","sha":"4b4cc82cf585fc9d4f3fd2b02b533b209d007f14","user":{"login":"RubyBursaRelsohod","id":13592260,"avatar_url":"https://avatars.githubusercontent.com/u/13592260?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyBursaRelsohod","html_url":"https://github.com/RubyBursaRelsohod","followers_url":"https://api.github.com/users/RubyBursaRelsohod/followers","following_url":"https://api.github.com/users/RubyBursaRelsohod/following{/other_user}","gists_url":"https://api.github.com/users/RubyBursaRelsohod/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyBursaRelsohod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyBursaRelsohod/subscriptions","organizations_url":"https://api.github.com/users/RubyBursaRelsohod/orgs","repos_url":"https://api.github.com/users/RubyBursaRelsohod/repos","events_url":"https://api.github.com/users/RubyBursaRelsohod/events{/privacy}","received_events_url":"https://api.github.com/users/RubyBursaRelsohod/received_events","type":"Organization","site_admin":false},"repo":{"id":40019867,"name":"team_project","full_name":"RubyBursaRelsohod/team_project","owner":{"login":"RubyBursaRelsohod","id":13592260,"avatar_url":"https://avatars.githubusercontent.com/u/13592260?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyBursaRelsohod","html_url":"https://github.com/RubyBursaRelsohod","followers_url":"https://api.github.com/users/RubyBursaRelsohod/followers","following_url":"https://api.github.com/users/RubyBursaRelsohod/following{/other_user}","gists_url":"https://api.github.com/users/RubyBursaRelsohod/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyBursaRelsohod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyBursaRelsohod/subscriptions","organizations_url":"https://api.github.com/users/RubyBursaRelsohod/orgs","repos_url":"https://api.github.com/users/RubyBursaRelsohod/repos","events_url":"https://api.github.com/users/RubyBursaRelsohod/events{/privacy}","received_events_url":"https://api.github.com/users/RubyBursaRelsohod/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RubyBursaRelsohod/team_project","description":"Musical Instruments Shop","fork":false,"url":"https://api.github.com/repos/RubyBursaRelsohod/team_project","forks_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/forks","keys_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/teams","hooks_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/hooks","issue_events_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/events{/number}","events_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/events","assignees_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/assignees{/user}","branches_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/branches{/branch}","tags_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/tags","blobs_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/statuses/{sha}","languages_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/languages","stargazers_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/stargazers","contributors_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/contributors","subscribers_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/subscribers","subscription_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/subscription","commits_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/contents/{+path}","compare_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/merges","archive_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/downloads","issues_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues{/number}","pulls_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls{/number}","milestones_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/milestones{/number}","notifications_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/labels{/name}","releases_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/releases{/id}","created_at":"2015-07-31T18:46:30Z","updated_at":"2015-08-09T09:48:23Z","pushed_at":"2015-08-30T13:21:18Z","git_url":"git://github.com/RubyBursaRelsohod/team_project.git","ssh_url":"git@github.com:RubyBursaRelsohod/team_project.git","clone_url":"https://github.com/RubyBursaRelsohod/team_project.git","svn_url":"https://github.com/RubyBursaRelsohod/team_project","homepage":"http://relsohod.herokuapp.com/","size":10020,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":1,"default_branch":"development"}},"base":{"label":"RubyBursaRelsohod:development","ref":"development","sha":"6a86fd9fd18b14a009f122e1e5d29f51cc1f5de0","user":{"login":"RubyBursaRelsohod","id":13592260,"avatar_url":"https://avatars.githubusercontent.com/u/13592260?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyBursaRelsohod","html_url":"https://github.com/RubyBursaRelsohod","followers_url":"https://api.github.com/users/RubyBursaRelsohod/followers","following_url":"https://api.github.com/users/RubyBursaRelsohod/following{/other_user}","gists_url":"https://api.github.com/users/RubyBursaRelsohod/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyBursaRelsohod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyBursaRelsohod/subscriptions","organizations_url":"https://api.github.com/users/RubyBursaRelsohod/orgs","repos_url":"https://api.github.com/users/RubyBursaRelsohod/repos","events_url":"https://api.github.com/users/RubyBursaRelsohod/events{/privacy}","received_events_url":"https://api.github.com/users/RubyBursaRelsohod/received_events","type":"Organization","site_admin":false},"repo":{"id":40019867,"name":"team_project","full_name":"RubyBursaRelsohod/team_project","owner":{"login":"RubyBursaRelsohod","id":13592260,"avatar_url":"https://avatars.githubusercontent.com/u/13592260?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyBursaRelsohod","html_url":"https://github.com/RubyBursaRelsohod","followers_url":"https://api.github.com/users/RubyBursaRelsohod/followers","following_url":"https://api.github.com/users/RubyBursaRelsohod/following{/other_user}","gists_url":"https://api.github.com/users/RubyBursaRelsohod/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyBursaRelsohod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyBursaRelsohod/subscriptions","organizations_url":"https://api.github.com/users/RubyBursaRelsohod/orgs","repos_url":"https://api.github.com/users/RubyBursaRelsohod/repos","events_url":"https://api.github.com/users/RubyBursaRelsohod/events{/privacy}","received_events_url":"https://api.github.com/users/RubyBursaRelsohod/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RubyBursaRelsohod/team_project","description":"Musical Instruments Shop","fork":false,"url":"https://api.github.com/repos/RubyBursaRelsohod/team_project","forks_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/forks","keys_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/teams","hooks_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/hooks","issue_events_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/events{/number}","events_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/events","assignees_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/assignees{/user}","branches_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/branches{/branch}","tags_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/tags","blobs_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/statuses/{sha}","languages_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/languages","stargazers_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/stargazers","contributors_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/contributors","subscribers_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/subscribers","subscription_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/subscription","commits_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/contents/{+path}","compare_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/merges","archive_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/downloads","issues_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues{/number}","pulls_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls{/number}","milestones_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/milestones{/number}","notifications_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/labels{/name}","releases_url":"https://api.github.com/repos/RubyBursaRelsohod/team_project/releases{/id}","created_at":"2015-07-31T18:46:30Z","updated_at":"2015-08-09T09:48:23Z","pushed_at":"2015-08-30T13:21:18Z","git_url":"git://github.com/RubyBursaRelsohod/team_project.git","ssh_url":"git@github.com:RubyBursaRelsohod/team_project.git","clone_url":"https://github.com/RubyBursaRelsohod/team_project.git","svn_url":"https://github.com/RubyBursaRelsohod/team_project","homepage":"http://relsohod.herokuapp.com/","size":10020,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":1,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109"},"html":{"href":"https://github.com/RubyBursaRelsohod/team_project/pull/109"},"issue":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/109"},"comments":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/RubyBursaRelsohod/team_project/statuses/4b4cc82cf585fc9d4f3fd2b02b533b209d007f14"}}}}