{"action":"created","comment":{"url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments/74233782","id":74233782,"diff_hunk":"@@ -2,7 +2,23 @@\n \n RSpec.describe Answer, type: :model do\n \n-\tdescribe \"validations\" do\n-\t\tit { should validate_presence_of :body }\n-\tend\n+  before { @answer = Answer.new(body: \"Any text\", question_id: question_id) }","path":"spec/models/answer_spec.rb","position":null,"original_position":7,"commit_id":"ae7f8be488054d8a544ce06c6f0414de5d32c397","original_commit_id":"ae7f8be488054d8a544ce06c6f0414de5d32c397","user":{"login":"mkaravaev","id":1493496,"avatar_url":"https://avatars.githubusercontent.com/u/1493496?v=3","gravatar_id":"","url":"https://api.github.com/users/mkaravaev","html_url":"https://github.com/mkaravaev","followers_url":"https://api.github.com/users/mkaravaev/followers","following_url":"https://api.github.com/users/mkaravaev/following{/other_user}","gists_url":"https://api.github.com/users/mkaravaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mkaravaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkaravaev/subscriptions","organizations_url":"https://api.github.com/users/mkaravaev/orgs","repos_url":"https://api.github.com/users/mkaravaev/repos","events_url":"https://api.github.com/users/mkaravaev/events{/privacy}","received_events_url":"https://api.github.com/users/mkaravaev/received_events","type":"User","site_admin":false},"body":"\"добавления столбца (вручную)\" что ты имеешь ввиду? Через миграцию или прямо в schema.rb? Нужно добавлять только (!!!) через миграции \"rails g migration add_question_id_to_question question_id: integer\" после этого делать rake db:migrate.","created_at":"2016-08-10T12:26:14Z","updated_at":"2016-08-10T12:26:14Z","html_url":"https://github.com/abozhiy/TN_Sample_App/pull/1#discussion_r74233782","pull_request_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments/74233782"},"html":{"href":"https://github.com/abozhiy/TN_Sample_App/pull/1#discussion_r74233782"},"pull_request":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1","id":80699736,"html_url":"https://github.com/abozhiy/TN_Sample_App/pull/1","diff_url":"https://github.com/abozhiy/TN_Sample_App/pull/1.diff","patch_url":"https://github.com/abozhiy/TN_Sample_App/pull/1.patch","issue_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/1","number":1,"state":"open","locked":false,"title":"Question & Answer models","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"body":"Добавил модель Вопрос и модель Ответ. Исходя из примера в скринкасте протестировал валидацию, а дальше не могу сообразить как протестировать \"связи с другими таблицами и т.п.\", имеется ввиду связи belongs_to/has_many? ","created_at":"2016-08-09T21:40:03Z","updated_at":"2016-08-10T12:26:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e6545e7528cbe5ce688d4d232c540438c4e5ea6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1/commits","review_comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1/comments","review_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/1/comments","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/ae7f8be488054d8a544ce06c6f0414de5d32c397","head":{"label":"abozhiy:question-model","ref":"question-model","sha":"ae7f8be488054d8a544ce06c6f0414de5d32c397","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"repo":{"id":65312098,"name":"TN_Sample_App","full_name":"abozhiy/TN_Sample_App","owner":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abozhiy/TN_Sample_App","description":null,"fork":false,"url":"https://api.github.com/repos/abozhiy/TN_Sample_App","forks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/forks","keys_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/teams","hooks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/hooks","issue_events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/events{/number}","events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/events","assignees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/assignees{/user}","branches_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/branches{/branch}","tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/tags","blobs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/{sha}","languages_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/languages","stargazers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/stargazers","contributors_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contributors","subscribers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscribers","subscription_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscription","commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contents/{+path}","compare_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/merges","archive_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/downloads","issues_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues{/number}","pulls_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls{/number}","milestones_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/milestones{/number}","notifications_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/labels{/name}","releases_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/releases{/id}","deployments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/deployments","created_at":"2016-08-09T16:49:47Z","updated_at":"2016-08-09T16:50:16Z","pushed_at":"2016-08-10T10:46:17Z","git_url":"git://github.com/abozhiy/TN_Sample_App.git","ssh_url":"git@github.com:abozhiy/TN_Sample_App.git","clone_url":"https://github.com/abozhiy/TN_Sample_App.git","svn_url":"https://github.com/abozhiy/TN_Sample_App","homepage":null,"size":31,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"abozhiy:master","ref":"master","sha":"5f2d8fbd4f8ab7e0fb17c9ad601b74cada9ceed8","user":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"repo":{"id":65312098,"name":"TN_Sample_App","full_name":"abozhiy/TN_Sample_App","owner":{"login":"abozhiy","id":20154523,"avatar_url":"https://avatars.githubusercontent.com/u/20154523?v=3","gravatar_id":"","url":"https://api.github.com/users/abozhiy","html_url":"https://github.com/abozhiy","followers_url":"https://api.github.com/users/abozhiy/followers","following_url":"https://api.github.com/users/abozhiy/following{/other_user}","gists_url":"https://api.github.com/users/abozhiy/gists{/gist_id}","starred_url":"https://api.github.com/users/abozhiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abozhiy/subscriptions","organizations_url":"https://api.github.com/users/abozhiy/orgs","repos_url":"https://api.github.com/users/abozhiy/repos","events_url":"https://api.github.com/users/abozhiy/events{/privacy}","received_events_url":"https://api.github.com/users/abozhiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abozhiy/TN_Sample_App","description":null,"fork":false,"url":"https://api.github.com/repos/abozhiy/TN_Sample_App","forks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/forks","keys_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/teams","hooks_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/hooks","issue_events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/events{/number}","events_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/events","assignees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/assignees{/user}","branches_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/branches{/branch}","tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/tags","blobs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/{sha}","languages_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/languages","stargazers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/stargazers","contributors_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contributors","subscribers_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscribers","subscription_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/subscription","commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/contents/{+path}","compare_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/merges","archive_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/downloads","issues_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues{/number}","pulls_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls{/number}","milestones_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/milestones{/number}","notifications_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/labels{/name}","releases_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/releases{/id}","deployments_url":"https://api.github.com/repos/abozhiy/TN_Sample_App/deployments","created_at":"2016-08-09T16:49:47Z","updated_at":"2016-08-09T16:50:16Z","pushed_at":"2016-08-10T10:46:17Z","git_url":"git://github.com/abozhiy/TN_Sample_App.git","ssh_url":"git@github.com:abozhiy/TN_Sample_App.git","clone_url":"https://github.com/abozhiy/TN_Sample_App.git","svn_url":"https://github.com/abozhiy/TN_Sample_App","homepage":null,"size":31,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1"},"html":{"href":"https://github.com/abozhiy/TN_Sample_App/pull/1"},"issue":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/1"},"comments":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/abozhiy/TN_Sample_App/statuses/ae7f8be488054d8a544ce06c6f0414de5d32c397"}}}}
{"actor":{"display_login":"mkaravaev"}}