{"action":"created","comment":{"url":"https://api.github.com/repos/juliusb0205/training/pulls/comments/66948436","id":66948436,"diff_hunk":"@@ -2,19 +2,15 @@ class AnswersController < ApplicationController\n \n \tdef create\n \t\t@question = Question.find params[:question_id]\n-\t\tanswer = @question.answers.build answerable_params\n-\t\tanswer.user_id = current_user.id\n-\t\tanswer.save\n+\n+\t\t@form = AnswerForm.new current_user.answers.new\n+\t\tif @form.validate params[:answer]\n+\t\t\t@form.save\n+\t\t\t@question.answers << @form.model","path":"app/controllers/answers_controller.rb","position":11,"original_position":11,"commit_id":"0b5da68477ef5852e9b7b6c77881853cb13f08fe","original_commit_id":"0b5da68477ef5852e9b7b6c77881853cb13f08fe","user":{"login":"ming-ancino","id":6965733,"avatar_url":"https://avatars.githubusercontent.com/u/6965733?v=3","gravatar_id":"","url":"https://api.github.com/users/ming-ancino","html_url":"https://github.com/ming-ancino","followers_url":"https://api.github.com/users/ming-ancino/followers","following_url":"https://api.github.com/users/ming-ancino/following{/other_user}","gists_url":"https://api.github.com/users/ming-ancino/gists{/gist_id}","starred_url":"https://api.github.com/users/ming-ancino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ming-ancino/subscriptions","organizations_url":"https://api.github.com/users/ming-ancino/orgs","repos_url":"https://api.github.com/users/ming-ancino/repos","events_url":"https://api.github.com/users/ming-ancino/events{/privacy}","received_events_url":"https://api.github.com/users/ming-ancino/received_events","type":"User","site_admin":false},"body":"This assignment should be inside the form object.","created_at":"2016-06-14T10:54:08Z","updated_at":"2016-06-14T10:54:08Z","html_url":"https://github.com/juliusb0205/training/pull/23#discussion_r66948436","pull_request_url":"https://api.github.com/repos/juliusb0205/training/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/comments/66948436"},"html":{"href":"https://github.com/juliusb0205/training/pull/23#discussion_r66948436"},"pull_request":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/juliusb0205/training/pulls/23","id":73705992,"html_url":"https://github.com/juliusb0205/training/pull/23","diff_url":"https://github.com/juliusb0205/training/pull/23.diff","patch_url":"https://github.com/juliusb0205/training/pull/23.patch","issue_url":"https://api.github.com/repos/juliusb0205/training/issues/23","number":23,"state":"open","locked":false,"title":"Feature/reform comment","user":{"login":"juliusb0205","id":11909560,"avatar_url":"https://avatars.githubusercontent.com/u/11909560?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusb0205","html_url":"https://github.com/juliusb0205","followers_url":"https://api.github.com/users/juliusb0205/followers","following_url":"https://api.github.com/users/juliusb0205/following{/other_user}","gists_url":"https://api.github.com/users/juliusb0205/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusb0205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusb0205/subscriptions","organizations_url":"https://api.github.com/users/juliusb0205/orgs","repos_url":"https://api.github.com/users/juliusb0205/repos","events_url":"https://api.github.com/users/juliusb0205/events{/privacy}","received_events_url":"https://api.github.com/users/juliusb0205/received_events","type":"User","site_admin":false},"body":"@ming-ancino \r\n\r\nImplement reform on user, question create and edit, comments, answers.","created_at":"2016-06-14T09:21:19Z","updated_at":"2016-06-14T10:54:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c09561b442691628317c74c7565a91ad7b23721b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juliusb0205/training/pulls/23/commits","review_comments_url":"https://api.github.com/repos/juliusb0205/training/pulls/23/comments","review_comment_url":"https://api.github.com/repos/juliusb0205/training/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juliusb0205/training/issues/23/comments","statuses_url":"https://api.github.com/repos/juliusb0205/training/statuses/0b5da68477ef5852e9b7b6c77881853cb13f08fe","head":{"label":"juliusb0205:feature/reform-comment","ref":"feature/reform-comment","sha":"0b5da68477ef5852e9b7b6c77881853cb13f08fe","user":{"login":"juliusb0205","id":11909560,"avatar_url":"https://avatars.githubusercontent.com/u/11909560?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusb0205","html_url":"https://github.com/juliusb0205","followers_url":"https://api.github.com/users/juliusb0205/followers","following_url":"https://api.github.com/users/juliusb0205/following{/other_user}","gists_url":"https://api.github.com/users/juliusb0205/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusb0205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusb0205/subscriptions","organizations_url":"https://api.github.com/users/juliusb0205/orgs","repos_url":"https://api.github.com/users/juliusb0205/repos","events_url":"https://api.github.com/users/juliusb0205/events{/privacy}","received_events_url":"https://api.github.com/users/juliusb0205/received_events","type":"User","site_admin":false},"repo":{"id":60240047,"name":"training","full_name":"juliusb0205/training","owner":{"login":"juliusb0205","id":11909560,"avatar_url":"https://avatars.githubusercontent.com/u/11909560?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusb0205","html_url":"https://github.com/juliusb0205","followers_url":"https://api.github.com/users/juliusb0205/followers","following_url":"https://api.github.com/users/juliusb0205/following{/other_user}","gists_url":"https://api.github.com/users/juliusb0205/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusb0205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusb0205/subscriptions","organizations_url":"https://api.github.com/users/juliusb0205/orgs","repos_url":"https://api.github.com/users/juliusb0205/repos","events_url":"https://api.github.com/users/juliusb0205/events{/privacy}","received_events_url":"https://api.github.com/users/juliusb0205/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juliusb0205/training","description":"","fork":false,"url":"https://api.github.com/repos/juliusb0205/training","forks_url":"https://api.github.com/repos/juliusb0205/training/forks","keys_url":"https://api.github.com/repos/juliusb0205/training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliusb0205/training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliusb0205/training/teams","hooks_url":"https://api.github.com/repos/juliusb0205/training/hooks","issue_events_url":"https://api.github.com/repos/juliusb0205/training/issues/events{/number}","events_url":"https://api.github.com/repos/juliusb0205/training/events","assignees_url":"https://api.github.com/repos/juliusb0205/training/assignees{/user}","branches_url":"https://api.github.com/repos/juliusb0205/training/branches{/branch}","tags_url":"https://api.github.com/repos/juliusb0205/training/tags","blobs_url":"https://api.github.com/repos/juliusb0205/training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliusb0205/training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliusb0205/training/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliusb0205/training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliusb0205/training/statuses/{sha}","languages_url":"https://api.github.com/repos/juliusb0205/training/languages","stargazers_url":"https://api.github.com/repos/juliusb0205/training/stargazers","contributors_url":"https://api.github.com/repos/juliusb0205/training/contributors","subscribers_url":"https://api.github.com/repos/juliusb0205/training/subscribers","subscription_url":"https://api.github.com/repos/juliusb0205/training/subscription","commits_url":"https://api.github.com/repos/juliusb0205/training/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliusb0205/training/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliusb0205/training/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliusb0205/training/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliusb0205/training/contents/{+path}","compare_url":"https://api.github.com/repos/juliusb0205/training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliusb0205/training/merges","archive_url":"https://api.github.com/repos/juliusb0205/training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliusb0205/training/downloads","issues_url":"https://api.github.com/repos/juliusb0205/training/issues{/number}","pulls_url":"https://api.github.com/repos/juliusb0205/training/pulls{/number}","milestones_url":"https://api.github.com/repos/juliusb0205/training/milestones{/number}","notifications_url":"https://api.github.com/repos/juliusb0205/training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliusb0205/training/labels{/name}","releases_url":"https://api.github.com/repos/juliusb0205/training/releases{/id}","deployments_url":"https://api.github.com/repos/juliusb0205/training/deployments","created_at":"2016-06-02T06:57:34Z","updated_at":"2016-06-13T08:57:03Z","pushed_at":"2016-06-14T10:40:58Z","git_url":"git://github.com/juliusb0205/training.git","ssh_url":"git@github.com:juliusb0205/training.git","clone_url":"https://github.com/juliusb0205/training.git","svn_url":"https://github.com/juliusb0205/training","homepage":null,"size":911,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"juliusb0205:master","ref":"master","sha":"15feddd7349355732fd9cf0cf39b06e557adc572","user":{"login":"juliusb0205","id":11909560,"avatar_url":"https://avatars.githubusercontent.com/u/11909560?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusb0205","html_url":"https://github.com/juliusb0205","followers_url":"https://api.github.com/users/juliusb0205/followers","following_url":"https://api.github.com/users/juliusb0205/following{/other_user}","gists_url":"https://api.github.com/users/juliusb0205/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusb0205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusb0205/subscriptions","organizations_url":"https://api.github.com/users/juliusb0205/orgs","repos_url":"https://api.github.com/users/juliusb0205/repos","events_url":"https://api.github.com/users/juliusb0205/events{/privacy}","received_events_url":"https://api.github.com/users/juliusb0205/received_events","type":"User","site_admin":false},"repo":{"id":60240047,"name":"training","full_name":"juliusb0205/training","owner":{"login":"juliusb0205","id":11909560,"avatar_url":"https://avatars.githubusercontent.com/u/11909560?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusb0205","html_url":"https://github.com/juliusb0205","followers_url":"https://api.github.com/users/juliusb0205/followers","following_url":"https://api.github.com/users/juliusb0205/following{/other_user}","gists_url":"https://api.github.com/users/juliusb0205/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusb0205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusb0205/subscriptions","organizations_url":"https://api.github.com/users/juliusb0205/orgs","repos_url":"https://api.github.com/users/juliusb0205/repos","events_url":"https://api.github.com/users/juliusb0205/events{/privacy}","received_events_url":"https://api.github.com/users/juliusb0205/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juliusb0205/training","description":"","fork":false,"url":"https://api.github.com/repos/juliusb0205/training","forks_url":"https://api.github.com/repos/juliusb0205/training/forks","keys_url":"https://api.github.com/repos/juliusb0205/training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliusb0205/training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliusb0205/training/teams","hooks_url":"https://api.github.com/repos/juliusb0205/training/hooks","issue_events_url":"https://api.github.com/repos/juliusb0205/training/issues/events{/number}","events_url":"https://api.github.com/repos/juliusb0205/training/events","assignees_url":"https://api.github.com/repos/juliusb0205/training/assignees{/user}","branches_url":"https://api.github.com/repos/juliusb0205/training/branches{/branch}","tags_url":"https://api.github.com/repos/juliusb0205/training/tags","blobs_url":"https://api.github.com/repos/juliusb0205/training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliusb0205/training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliusb0205/training/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliusb0205/training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliusb0205/training/statuses/{sha}","languages_url":"https://api.github.com/repos/juliusb0205/training/languages","stargazers_url":"https://api.github.com/repos/juliusb0205/training/stargazers","contributors_url":"https://api.github.com/repos/juliusb0205/training/contributors","subscribers_url":"https://api.github.com/repos/juliusb0205/training/subscribers","subscription_url":"https://api.github.com/repos/juliusb0205/training/subscription","commits_url":"https://api.github.com/repos/juliusb0205/training/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliusb0205/training/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliusb0205/training/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliusb0205/training/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliusb0205/training/contents/{+path}","compare_url":"https://api.github.com/repos/juliusb0205/training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliusb0205/training/merges","archive_url":"https://api.github.com/repos/juliusb0205/training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliusb0205/training/downloads","issues_url":"https://api.github.com/repos/juliusb0205/training/issues{/number}","pulls_url":"https://api.github.com/repos/juliusb0205/training/pulls{/number}","milestones_url":"https://api.github.com/repos/juliusb0205/training/milestones{/number}","notifications_url":"https://api.github.com/repos/juliusb0205/training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliusb0205/training/labels{/name}","releases_url":"https://api.github.com/repos/juliusb0205/training/releases{/id}","deployments_url":"https://api.github.com/repos/juliusb0205/training/deployments","created_at":"2016-06-02T06:57:34Z","updated_at":"2016-06-13T08:57:03Z","pushed_at":"2016-06-14T10:40:58Z","git_url":"git://github.com/juliusb0205/training.git","ssh_url":"git@github.com:juliusb0205/training.git","clone_url":"https://github.com/juliusb0205/training.git","svn_url":"https://github.com/juliusb0205/training","homepage":null,"size":911,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/23"},"html":{"href":"https://github.com/juliusb0205/training/pull/23"},"issue":{"href":"https://api.github.com/repos/juliusb0205/training/issues/23"},"comments":{"href":"https://api.github.com/repos/juliusb0205/training/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juliusb0205/training/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/juliusb0205/training/statuses/0b5da68477ef5852e9b7b6c77881853cb13f08fe"}}}}
{"actor":{"display_login":"ming-ancino"}}