{"action":"created","comment":{"url":"https://api.github.com/repos/isnoto/flashcards/pulls/comments/42555297","id":42555297,"diff_hunk":"@@ -16,18 +18,19 @@ def edit\n   end\n \n   def create\n-    @card = Card.new(card_params)\n+    @card = current_user.cards.build(card_params)\n \n     if @card.save\n-      redirect_to cards_path\n+      redirect_to cards_path, notice: 'Карточка создана'\n     else\n+      flash.now[:alert] = 'Заполните все поля!'","path":"app/controllers/cards_controller.rb","position":23,"original_position":23,"commit_id":"93a817a631026fcd2abf1fa7edec3044d085f089","original_commit_id":"93a817a631026fcd2abf1fa7edec3044d085f089","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-10-20T21:14:04Z","updated_at":"2015-10-20T21:14:04Z","html_url":"https://github.com/isnoto/flashcards/pull/10#discussion_r42555297","pull_request_url":"https://api.github.com/repos/isnoto/flashcards/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/comments/42555297"},"html":{"href":"https://github.com/isnoto/flashcards/pull/10#discussion_r42555297"},"pull_request":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/isnoto/flashcards/pulls/10","id":48085463,"html_url":"https://github.com/isnoto/flashcards/pull/10","diff_url":"https://github.com/isnoto/flashcards/pull/10.diff","patch_url":"https://github.com/isnoto/flashcards/pull/10.patch","issue_url":"https://api.github.com/repos/isnoto/flashcards/issues/10","number":10,"state":"open","locked":false,"title":"Ninth task","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-19T15:18:56Z","updated_at":"2015-10-20T21:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a02dd940e8321a6f9fe5bc08227adaa8d31d770b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/isnoto/flashcards/pulls/10/commits","review_comments_url":"https://api.github.com/repos/isnoto/flashcards/pulls/10/comments","review_comment_url":"https://api.github.com/repos/isnoto/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isnoto/flashcards/issues/10/comments","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/93a817a631026fcd2abf1fa7edec3044d085f089","head":{"label":"isnoto:ninth-task","ref":"ninth-task","sha":"93a817a631026fcd2abf1fa7edec3044d085f089","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"repo":{"id":42663356,"name":"flashcards","full_name":"isnoto/flashcards","owner":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isnoto/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/isnoto/flashcards","forks_url":"https://api.github.com/repos/isnoto/flashcards/forks","keys_url":"https://api.github.com/repos/isnoto/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isnoto/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isnoto/flashcards/teams","hooks_url":"https://api.github.com/repos/isnoto/flashcards/hooks","issue_events_url":"https://api.github.com/repos/isnoto/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/isnoto/flashcards/events","assignees_url":"https://api.github.com/repos/isnoto/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/isnoto/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/isnoto/flashcards/tags","blobs_url":"https://api.github.com/repos/isnoto/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isnoto/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isnoto/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/isnoto/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/isnoto/flashcards/languages","stargazers_url":"https://api.github.com/repos/isnoto/flashcards/stargazers","contributors_url":"https://api.github.com/repos/isnoto/flashcards/contributors","subscribers_url":"https://api.github.com/repos/isnoto/flashcards/subscribers","subscription_url":"https://api.github.com/repos/isnoto/flashcards/subscription","commits_url":"https://api.github.com/repos/isnoto/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/isnoto/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/isnoto/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/isnoto/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/isnoto/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/isnoto/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isnoto/flashcards/merges","archive_url":"https://api.github.com/repos/isnoto/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isnoto/flashcards/downloads","issues_url":"https://api.github.com/repos/isnoto/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/isnoto/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/isnoto/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/isnoto/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isnoto/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/isnoto/flashcards/releases{/id}","created_at":"2015-09-17T15:09:40Z","updated_at":"2015-09-22T21:20:37Z","pushed_at":"2015-10-20T21:14:01Z","git_url":"git://github.com/isnoto/flashcards.git","ssh_url":"git@github.com:isnoto/flashcards.git","clone_url":"https://github.com/isnoto/flashcards.git","svn_url":"https://github.com/isnoto/flashcards","homepage":null,"size":360,"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":"isnoto:master","ref":"master","sha":"2202a85861b7a8d0791a3b486fd7b465a90a296d","user":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"repo":{"id":42663356,"name":"flashcards","full_name":"isnoto/flashcards","owner":{"login":"isnoto","id":10686712,"avatar_url":"https://avatars.githubusercontent.com/u/10686712?v=3","gravatar_id":"","url":"https://api.github.com/users/isnoto","html_url":"https://github.com/isnoto","followers_url":"https://api.github.com/users/isnoto/followers","following_url":"https://api.github.com/users/isnoto/following{/other_user}","gists_url":"https://api.github.com/users/isnoto/gists{/gist_id}","starred_url":"https://api.github.com/users/isnoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isnoto/subscriptions","organizations_url":"https://api.github.com/users/isnoto/orgs","repos_url":"https://api.github.com/users/isnoto/repos","events_url":"https://api.github.com/users/isnoto/events{/privacy}","received_events_url":"https://api.github.com/users/isnoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isnoto/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/isnoto/flashcards","forks_url":"https://api.github.com/repos/isnoto/flashcards/forks","keys_url":"https://api.github.com/repos/isnoto/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isnoto/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isnoto/flashcards/teams","hooks_url":"https://api.github.com/repos/isnoto/flashcards/hooks","issue_events_url":"https://api.github.com/repos/isnoto/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/isnoto/flashcards/events","assignees_url":"https://api.github.com/repos/isnoto/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/isnoto/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/isnoto/flashcards/tags","blobs_url":"https://api.github.com/repos/isnoto/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isnoto/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isnoto/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/isnoto/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isnoto/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/isnoto/flashcards/languages","stargazers_url":"https://api.github.com/repos/isnoto/flashcards/stargazers","contributors_url":"https://api.github.com/repos/isnoto/flashcards/contributors","subscribers_url":"https://api.github.com/repos/isnoto/flashcards/subscribers","subscription_url":"https://api.github.com/repos/isnoto/flashcards/subscription","commits_url":"https://api.github.com/repos/isnoto/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/isnoto/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/isnoto/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/isnoto/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/isnoto/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/isnoto/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isnoto/flashcards/merges","archive_url":"https://api.github.com/repos/isnoto/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isnoto/flashcards/downloads","issues_url":"https://api.github.com/repos/isnoto/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/isnoto/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/isnoto/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/isnoto/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isnoto/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/isnoto/flashcards/releases{/id}","created_at":"2015-09-17T15:09:40Z","updated_at":"2015-09-22T21:20:37Z","pushed_at":"2015-10-20T21:14:01Z","git_url":"git://github.com/isnoto/flashcards.git","ssh_url":"git@github.com:isnoto/flashcards.git","clone_url":"https://github.com/isnoto/flashcards.git","svn_url":"https://github.com/isnoto/flashcards","homepage":null,"size":360,"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/isnoto/flashcards/pulls/10"},"html":{"href":"https://github.com/isnoto/flashcards/pull/10"},"issue":{"href":"https://api.github.com/repos/isnoto/flashcards/issues/10"},"comments":{"href":"https://api.github.com/repos/isnoto/flashcards/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isnoto/flashcards/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/isnoto/flashcards/statuses/93a817a631026fcd2abf1fa7edec3044d085f089"}}}}