{"action":"created","comment":{"url":"https://api.github.com/repos/ulizko/flashcards/pulls/comments/62460728","id":62460728,"diff_hunk":"@@ -1,9 +1,50 @@\n class CardsController < ApplicationController\n   \n+  before_filter :find_card, only: [:show, :edit, :update, :destroy]\n+  \n+  def new\n+    @card = Card.new\n+  end\n+  \n+  def create\n+    @card = Card.new(card_params)\n+    if @card.save\n+      redirect_to action: 'index'\n+    else\n+      render 'new'\n+    end\n+  end\n+  \n   def index\n     @cards = Card.all\n   end\n   \n   def show\n   end\n+  \n+  def edit\n+  end\n+  \n+  def update\n+    if @card.update(card_params)\n+      redirect_to action: 'index'\n+    else\n+      render 'edit'\n+    end\n+  end\n+  ","path":"app/controllers/cards_controller.rb","position":35,"original_position":35,"commit_id":"9130a20855537ffe34cf90c3a33dfa0f88f61013","original_commit_id":"9130a20855537ffe34cf90c3a33dfa0f88f61013","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Trailing whitespace detected.","created_at":"2016-05-09T07:56:41Z","updated_at":"2016-05-09T07:56:41Z","html_url":"https://github.com/ulizko/flashcards/pull/3#discussion_r62460728","pull_request_url":"https://api.github.com/repos/ulizko/flashcards/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ulizko/flashcards/pulls/comments/62460728"},"html":{"href":"https://github.com/ulizko/flashcards/pull/3#discussion_r62460728"},"pull_request":{"href":"https://api.github.com/repos/ulizko/flashcards/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ulizko/flashcards/pulls/3","id":69307551,"html_url":"https://github.com/ulizko/flashcards/pull/3","diff_url":"https://github.com/ulizko/flashcards/pull/3.diff","patch_url":"https://github.com/ulizko/flashcards/pull/3.patch","issue_url":"https://api.github.com/repos/ulizko/flashcards/issues/3","number":3,"state":"open","locked":false,"title":"add validates","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-09T07:56:36Z","updated_at":"2016-05-09T07:56:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a329940f388ec93a5ae5be730f625f03da6d57cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ulizko/flashcards/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ulizko/flashcards/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ulizko/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ulizko/flashcards/issues/3/comments","statuses_url":"https://api.github.com/repos/ulizko/flashcards/statuses/9130a20855537ffe34cf90c3a33dfa0f88f61013","head":{"label":"ulizko:third-task","ref":"third-task","sha":"9130a20855537ffe34cf90c3a33dfa0f88f61013","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"repo":{"id":58144438,"name":"flashcards","full_name":"ulizko/flashcards","owner":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ulizko/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ulizko/flashcards","forks_url":"https://api.github.com/repos/ulizko/flashcards/forks","keys_url":"https://api.github.com/repos/ulizko/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ulizko/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ulizko/flashcards/teams","hooks_url":"https://api.github.com/repos/ulizko/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ulizko/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ulizko/flashcards/events","assignees_url":"https://api.github.com/repos/ulizko/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ulizko/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ulizko/flashcards/tags","blobs_url":"https://api.github.com/repos/ulizko/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ulizko/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ulizko/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ulizko/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ulizko/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ulizko/flashcards/languages","stargazers_url":"https://api.github.com/repos/ulizko/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ulizko/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ulizko/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ulizko/flashcards/subscription","commits_url":"https://api.github.com/repos/ulizko/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ulizko/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ulizko/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ulizko/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ulizko/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ulizko/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ulizko/flashcards/merges","archive_url":"https://api.github.com/repos/ulizko/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ulizko/flashcards/downloads","issues_url":"https://api.github.com/repos/ulizko/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ulizko/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ulizko/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ulizko/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ulizko/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ulizko/flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/ulizko/flashcards/deployments","created_at":"2016-05-05T16:19:27Z","updated_at":"2016-05-06T15:05:47Z","pushed_at":"2016-05-09T07:56:36Z","git_url":"git://github.com/ulizko/flashcards.git","ssh_url":"git@github.com:ulizko/flashcards.git","clone_url":"https://github.com/ulizko/flashcards.git","svn_url":"https://github.com/ulizko/flashcards","homepage":null,"size":210,"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":"ulizko:master","ref":"master","sha":"b0d14c5467692616efa1d121ba1aa20bb905a8ad","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"repo":{"id":58144438,"name":"flashcards","full_name":"ulizko/flashcards","owner":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ulizko/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ulizko/flashcards","forks_url":"https://api.github.com/repos/ulizko/flashcards/forks","keys_url":"https://api.github.com/repos/ulizko/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ulizko/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ulizko/flashcards/teams","hooks_url":"https://api.github.com/repos/ulizko/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ulizko/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ulizko/flashcards/events","assignees_url":"https://api.github.com/repos/ulizko/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ulizko/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ulizko/flashcards/tags","blobs_url":"https://api.github.com/repos/ulizko/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ulizko/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ulizko/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ulizko/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ulizko/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ulizko/flashcards/languages","stargazers_url":"https://api.github.com/repos/ulizko/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ulizko/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ulizko/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ulizko/flashcards/subscription","commits_url":"https://api.github.com/repos/ulizko/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ulizko/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ulizko/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ulizko/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ulizko/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ulizko/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ulizko/flashcards/merges","archive_url":"https://api.github.com/repos/ulizko/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ulizko/flashcards/downloads","issues_url":"https://api.github.com/repos/ulizko/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ulizko/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ulizko/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ulizko/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ulizko/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ulizko/flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/ulizko/flashcards/deployments","created_at":"2016-05-05T16:19:27Z","updated_at":"2016-05-06T15:05:47Z","pushed_at":"2016-05-09T07:56:36Z","git_url":"git://github.com/ulizko/flashcards.git","ssh_url":"git@github.com:ulizko/flashcards.git","clone_url":"https://github.com/ulizko/flashcards.git","svn_url":"https://github.com/ulizko/flashcards","homepage":null,"size":210,"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/ulizko/flashcards/pulls/3"},"html":{"href":"https://github.com/ulizko/flashcards/pull/3"},"issue":{"href":"https://api.github.com/repos/ulizko/flashcards/issues/3"},"comments":{"href":"https://api.github.com/repos/ulizko/flashcards/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ulizko/flashcards/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ulizko/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ulizko/flashcards/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ulizko/flashcards/statuses/9130a20855537ffe34cf90c3a33dfa0f88f61013"}}}}