{"action":"created","comment":{"url":"https://api.github.com/repos/Makeam/AMQ/pulls/comments/31789826","id":31789826,"diff_hunk":"@@ -0,0 +1,32 @@\n+require 'rails_helper'\n+\n+RSpec.describe AnswersController, type: :controller do\n+\n+  let (:question) { FactoryGirl.create(:question) }\n+\n+  describe 'POST #create' do\n+    context 'with valid attributes' do\n+      it 'redirects to question#show view' do\n+        post :create, question_id: question, answer: FactoryGirl.attributes_for(:answer)\n+        expect(response).to redirect_to question_path(question)\n+      end\n+\n+      it 'saves the new answer in the database' do","path":"spec/controllers/answers_controller_spec.rb","position":14,"original_position":14,"commit_id":"bcd6877ccdee2cda83cb487c93bd2f3dd65d8ecd","original_commit_id":"bcd6877ccdee2cda83cb487c93bd2f3dd65d8ecd","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"body":"Не совсем. \r\n\r\nМожно просто заменить `Answer` на `question.answers` в `change(...)`.","created_at":"2015-06-05T06:15:21Z","updated_at":"2015-06-05T06:15:21Z","html_url":"https://github.com/Makeam/AMQ/pull/2#discussion_r31789826","pull_request_url":"https://api.github.com/repos/Makeam/AMQ/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/Makeam/AMQ/pulls/comments/31789826"},"html":{"href":"https://github.com/Makeam/AMQ/pull/2#discussion_r31789826"},"pull_request":{"href":"https://api.github.com/repos/Makeam/AMQ/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/Makeam/AMQ/pulls/2","id":36965670,"html_url":"https://github.com/Makeam/AMQ/pull/2","diff_url":"https://github.com/Makeam/AMQ/pull/2.diff","patch_url":"https://github.com/Makeam/AMQ/pull/2.patch","issue_url":"https://api.github.com/repos/Makeam/AMQ/issues/2","number":2,"state":"open","locked":false,"title":"Lesson 4","user":{"login":"Makeam","id":5992510,"avatar_url":"https://avatars.githubusercontent.com/u/5992510?v=3","gravatar_id":"","url":"https://api.github.com/users/Makeam","html_url":"https://github.com/Makeam","followers_url":"https://api.github.com/users/Makeam/followers","following_url":"https://api.github.com/users/Makeam/following{/other_user}","gists_url":"https://api.github.com/users/Makeam/gists{/gist_id}","starred_url":"https://api.github.com/users/Makeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makeam/subscriptions","organizations_url":"https://api.github.com/users/Makeam/orgs","repos_url":"https://api.github.com/users/Makeam/repos","events_url":"https://api.github.com/users/Makeam/events{/privacy}","received_events_url":"https://api.github.com/users/Makeam/received_events","type":"User","site_admin":false},"body":"Не понял нужно ли было создавать вьюхи. Для создания вопроса - вьюхи есть, для создания ответа пока нет. ","created_at":"2015-06-04T18:49:50Z","updated_at":"2015-06-05T06:15:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d51822368303a37b23ae3ea5475f7b3b2482fe95","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Makeam/AMQ/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Makeam/AMQ/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Makeam/AMQ/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Makeam/AMQ/issues/2/comments","statuses_url":"https://api.github.com/repos/Makeam/AMQ/statuses/bcd6877ccdee2cda83cb487c93bd2f3dd65d8ecd","head":{"label":"Makeam:les4","ref":"les4","sha":"bcd6877ccdee2cda83cb487c93bd2f3dd65d8ecd","user":{"login":"Makeam","id":5992510,"avatar_url":"https://avatars.githubusercontent.com/u/5992510?v=3","gravatar_id":"","url":"https://api.github.com/users/Makeam","html_url":"https://github.com/Makeam","followers_url":"https://api.github.com/users/Makeam/followers","following_url":"https://api.github.com/users/Makeam/following{/other_user}","gists_url":"https://api.github.com/users/Makeam/gists{/gist_id}","starred_url":"https://api.github.com/users/Makeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makeam/subscriptions","organizations_url":"https://api.github.com/users/Makeam/orgs","repos_url":"https://api.github.com/users/Makeam/repos","events_url":"https://api.github.com/users/Makeam/events{/privacy}","received_events_url":"https://api.github.com/users/Makeam/received_events","type":"User","site_admin":false},"repo":{"id":36682006,"name":"AMQ","full_name":"Makeam/AMQ","owner":{"login":"Makeam","id":5992510,"avatar_url":"https://avatars.githubusercontent.com/u/5992510?v=3","gravatar_id":"","url":"https://api.github.com/users/Makeam","html_url":"https://github.com/Makeam","followers_url":"https://api.github.com/users/Makeam/followers","following_url":"https://api.github.com/users/Makeam/following{/other_user}","gists_url":"https://api.github.com/users/Makeam/gists{/gist_id}","starred_url":"https://api.github.com/users/Makeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makeam/subscriptions","organizations_url":"https://api.github.com/users/Makeam/orgs","repos_url":"https://api.github.com/users/Makeam/repos","events_url":"https://api.github.com/users/Makeam/events{/privacy}","received_events_url":"https://api.github.com/users/Makeam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Makeam/AMQ","description":"","fork":false,"url":"https://api.github.com/repos/Makeam/AMQ","forks_url":"https://api.github.com/repos/Makeam/AMQ/forks","keys_url":"https://api.github.com/repos/Makeam/AMQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Makeam/AMQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Makeam/AMQ/teams","hooks_url":"https://api.github.com/repos/Makeam/AMQ/hooks","issue_events_url":"https://api.github.com/repos/Makeam/AMQ/issues/events{/number}","events_url":"https://api.github.com/repos/Makeam/AMQ/events","assignees_url":"https://api.github.com/repos/Makeam/AMQ/assignees{/user}","branches_url":"https://api.github.com/repos/Makeam/AMQ/branches{/branch}","tags_url":"https://api.github.com/repos/Makeam/AMQ/tags","blobs_url":"https://api.github.com/repos/Makeam/AMQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Makeam/AMQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Makeam/AMQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/Makeam/AMQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Makeam/AMQ/statuses/{sha}","languages_url":"https://api.github.com/repos/Makeam/AMQ/languages","stargazers_url":"https://api.github.com/repos/Makeam/AMQ/stargazers","contributors_url":"https://api.github.com/repos/Makeam/AMQ/contributors","subscribers_url":"https://api.github.com/repos/Makeam/AMQ/subscribers","subscription_url":"https://api.github.com/repos/Makeam/AMQ/subscription","commits_url":"https://api.github.com/repos/Makeam/AMQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/Makeam/AMQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/Makeam/AMQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/Makeam/AMQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/Makeam/AMQ/contents/{+path}","compare_url":"https://api.github.com/repos/Makeam/AMQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Makeam/AMQ/merges","archive_url":"https://api.github.com/repos/Makeam/AMQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Makeam/AMQ/downloads","issues_url":"https://api.github.com/repos/Makeam/AMQ/issues{/number}","pulls_url":"https://api.github.com/repos/Makeam/AMQ/pulls{/number}","milestones_url":"https://api.github.com/repos/Makeam/AMQ/milestones{/number}","notifications_url":"https://api.github.com/repos/Makeam/AMQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Makeam/AMQ/labels{/name}","releases_url":"https://api.github.com/repos/Makeam/AMQ/releases{/id}","created_at":"2015-06-01T19:00:35Z","updated_at":"2015-06-01T20:12:18Z","pushed_at":"2015-06-04T18:49:50Z","git_url":"git://github.com/Makeam/AMQ.git","ssh_url":"git@github.com:Makeam/AMQ.git","clone_url":"https://github.com/Makeam/AMQ.git","svn_url":"https://github.com/Makeam/AMQ","homepage":null,"size":0,"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":"Makeam:master","ref":"master","sha":"d4a9df59039df19dcfd1b195acfc3810a044b135","user":{"login":"Makeam","id":5992510,"avatar_url":"https://avatars.githubusercontent.com/u/5992510?v=3","gravatar_id":"","url":"https://api.github.com/users/Makeam","html_url":"https://github.com/Makeam","followers_url":"https://api.github.com/users/Makeam/followers","following_url":"https://api.github.com/users/Makeam/following{/other_user}","gists_url":"https://api.github.com/users/Makeam/gists{/gist_id}","starred_url":"https://api.github.com/users/Makeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makeam/subscriptions","organizations_url":"https://api.github.com/users/Makeam/orgs","repos_url":"https://api.github.com/users/Makeam/repos","events_url":"https://api.github.com/users/Makeam/events{/privacy}","received_events_url":"https://api.github.com/users/Makeam/received_events","type":"User","site_admin":false},"repo":{"id":36682006,"name":"AMQ","full_name":"Makeam/AMQ","owner":{"login":"Makeam","id":5992510,"avatar_url":"https://avatars.githubusercontent.com/u/5992510?v=3","gravatar_id":"","url":"https://api.github.com/users/Makeam","html_url":"https://github.com/Makeam","followers_url":"https://api.github.com/users/Makeam/followers","following_url":"https://api.github.com/users/Makeam/following{/other_user}","gists_url":"https://api.github.com/users/Makeam/gists{/gist_id}","starred_url":"https://api.github.com/users/Makeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makeam/subscriptions","organizations_url":"https://api.github.com/users/Makeam/orgs","repos_url":"https://api.github.com/users/Makeam/repos","events_url":"https://api.github.com/users/Makeam/events{/privacy}","received_events_url":"https://api.github.com/users/Makeam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Makeam/AMQ","description":"","fork":false,"url":"https://api.github.com/repos/Makeam/AMQ","forks_url":"https://api.github.com/repos/Makeam/AMQ/forks","keys_url":"https://api.github.com/repos/Makeam/AMQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Makeam/AMQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Makeam/AMQ/teams","hooks_url":"https://api.github.com/repos/Makeam/AMQ/hooks","issue_events_url":"https://api.github.com/repos/Makeam/AMQ/issues/events{/number}","events_url":"https://api.github.com/repos/Makeam/AMQ/events","assignees_url":"https://api.github.com/repos/Makeam/AMQ/assignees{/user}","branches_url":"https://api.github.com/repos/Makeam/AMQ/branches{/branch}","tags_url":"https://api.github.com/repos/Makeam/AMQ/tags","blobs_url":"https://api.github.com/repos/Makeam/AMQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Makeam/AMQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Makeam/AMQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/Makeam/AMQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Makeam/AMQ/statuses/{sha}","languages_url":"https://api.github.com/repos/Makeam/AMQ/languages","stargazers_url":"https://api.github.com/repos/Makeam/AMQ/stargazers","contributors_url":"https://api.github.com/repos/Makeam/AMQ/contributors","subscribers_url":"https://api.github.com/repos/Makeam/AMQ/subscribers","subscription_url":"https://api.github.com/repos/Makeam/AMQ/subscription","commits_url":"https://api.github.com/repos/Makeam/AMQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/Makeam/AMQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/Makeam/AMQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/Makeam/AMQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/Makeam/AMQ/contents/{+path}","compare_url":"https://api.github.com/repos/Makeam/AMQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Makeam/AMQ/merges","archive_url":"https://api.github.com/repos/Makeam/AMQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Makeam/AMQ/downloads","issues_url":"https://api.github.com/repos/Makeam/AMQ/issues{/number}","pulls_url":"https://api.github.com/repos/Makeam/AMQ/pulls{/number}","milestones_url":"https://api.github.com/repos/Makeam/AMQ/milestones{/number}","notifications_url":"https://api.github.com/repos/Makeam/AMQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Makeam/AMQ/labels{/name}","releases_url":"https://api.github.com/repos/Makeam/AMQ/releases{/id}","created_at":"2015-06-01T19:00:35Z","updated_at":"2015-06-01T20:12:18Z","pushed_at":"2015-06-04T18:49:50Z","git_url":"git://github.com/Makeam/AMQ.git","ssh_url":"git@github.com:Makeam/AMQ.git","clone_url":"https://github.com/Makeam/AMQ.git","svn_url":"https://github.com/Makeam/AMQ","homepage":null,"size":0,"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/Makeam/AMQ/pulls/2"},"html":{"href":"https://github.com/Makeam/AMQ/pull/2"},"issue":{"href":"https://api.github.com/repos/Makeam/AMQ/issues/2"},"comments":{"href":"https://api.github.com/repos/Makeam/AMQ/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Makeam/AMQ/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Makeam/AMQ/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Makeam/AMQ/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Makeam/AMQ/statuses/bcd6877ccdee2cda83cb487c93bd2f3dd65d8ecd"}}}}