{"action":"created","comment":{"url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/comments/26842049","id":26842049,"diff_hunk":"@@ -1,5 +1,47 @@\n class CardsController < ApplicationController\n+  before_action :find_card, only: [:update, :edit, :destroy]\n+\n   def index\n     @card = Card.all\n   end\n+\n+  def new\n+    @card = Card.new\n+  end\n+\n+  def create\n+    @card = Card.new(card_params)\n+\n+    if @card.save\n+      redirect_to cards_path\n+    else\n+      render \"new\"\n+    end\n+  end\n+\n+  def update\n+    if @card.update(card_params)\n+      redirect_to cards_path\n+    else\n+      render \"edit\"\n+    end\n+  end\n+\n+  def edit\n+  end\n+\n+  def destroy\n+    @card.destroy\n+    redirect_to cards_path\n+  end\n+\n+private","path":"app/controllers/cards_controller.rb","position":38,"original_position":38,"commit_id":"7117233b06f325363e547c9ec57c2bd8ed867eb2","original_commit_id":"7117233b06f325363e547c9ec57c2bd8ed867eb2","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":"Indent access modifiers like `private`.","created_at":"2015-03-20T14:14:41Z","updated_at":"2015-03-20T14:14:41Z","html_url":"https://github.com/sshkarupa/flashcards/pull/4#discussion_r26842049","pull_request_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/comments/26842049"},"html":{"href":"https://github.com/sshkarupa/flashcards/pull/4#discussion_r26842049"},"pull_request":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4","id":31577978,"html_url":"https://github.com/sshkarupa/flashcards/pull/4","diff_url":"https://github.com/sshkarupa/flashcards/pull/4.diff","patch_url":"https://github.com/sshkarupa/flashcards/pull/4.patch","issue_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/4","number":4,"state":"open","locked":false,"title":"Third task","user":{"login":"sshkarupa","id":10585770,"avatar_url":"https://avatars.githubusercontent.com/u/10585770?v=3","gravatar_id":"","url":"https://api.github.com/users/sshkarupa","html_url":"https://github.com/sshkarupa","followers_url":"https://api.github.com/users/sshkarupa/followers","following_url":"https://api.github.com/users/sshkarupa/following{/other_user}","gists_url":"https://api.github.com/users/sshkarupa/gists{/gist_id}","starred_url":"https://api.github.com/users/sshkarupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshkarupa/subscriptions","organizations_url":"https://api.github.com/users/sshkarupa/orgs","repos_url":"https://api.github.com/users/sshkarupa/repos","events_url":"https://api.github.com/users/sshkarupa/events{/privacy}","received_events_url":"https://api.github.com/users/sshkarupa/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-19T23:59:50Z","updated_at":"2015-03-20T14:14:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bdd13393155de35382498cd1fb58c474e41f956","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4/commits","review_comments_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4/comments","review_comment_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/4/comments","statuses_url":"https://api.github.com/repos/sshkarupa/flashcards/statuses/7117233b06f325363e547c9ec57c2bd8ed867eb2","head":{"label":"sshkarupa:third-task","ref":"third-task","sha":"7117233b06f325363e547c9ec57c2bd8ed867eb2","user":{"login":"sshkarupa","id":10585770,"avatar_url":"https://avatars.githubusercontent.com/u/10585770?v=3","gravatar_id":"","url":"https://api.github.com/users/sshkarupa","html_url":"https://github.com/sshkarupa","followers_url":"https://api.github.com/users/sshkarupa/followers","following_url":"https://api.github.com/users/sshkarupa/following{/other_user}","gists_url":"https://api.github.com/users/sshkarupa/gists{/gist_id}","starred_url":"https://api.github.com/users/sshkarupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshkarupa/subscriptions","organizations_url":"https://api.github.com/users/sshkarupa/orgs","repos_url":"https://api.github.com/users/sshkarupa/repos","events_url":"https://api.github.com/users/sshkarupa/events{/privacy}","received_events_url":"https://api.github.com/users/sshkarupa/received_events","type":"User","site_admin":false},"repo":{"id":32210929,"name":"flashcards","full_name":"sshkarupa/flashcards","owner":{"login":"sshkarupa","id":10585770,"avatar_url":"https://avatars.githubusercontent.com/u/10585770?v=3","gravatar_id":"","url":"https://api.github.com/users/sshkarupa","html_url":"https://github.com/sshkarupa","followers_url":"https://api.github.com/users/sshkarupa/followers","following_url":"https://api.github.com/users/sshkarupa/following{/other_user}","gists_url":"https://api.github.com/users/sshkarupa/gists{/gist_id}","starred_url":"https://api.github.com/users/sshkarupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshkarupa/subscriptions","organizations_url":"https://api.github.com/users/sshkarupa/orgs","repos_url":"https://api.github.com/users/sshkarupa/repos","events_url":"https://api.github.com/users/sshkarupa/events{/privacy}","received_events_url":"https://api.github.com/users/sshkarupa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sshkarupa/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sshkarupa/flashcards","forks_url":"https://api.github.com/repos/sshkarupa/flashcards/forks","keys_url":"https://api.github.com/repos/sshkarupa/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sshkarupa/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sshkarupa/flashcards/teams","hooks_url":"https://api.github.com/repos/sshkarupa/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sshkarupa/flashcards/events","assignees_url":"https://api.github.com/repos/sshkarupa/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sshkarupa/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sshkarupa/flashcards/tags","blobs_url":"https://api.github.com/repos/sshkarupa/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sshkarupa/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sshkarupa/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sshkarupa/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sshkarupa/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sshkarupa/flashcards/languages","stargazers_url":"https://api.github.com/repos/sshkarupa/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sshkarupa/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sshkarupa/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sshkarupa/flashcards/subscription","commits_url":"https://api.github.com/repos/sshkarupa/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sshkarupa/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sshkarupa/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sshkarupa/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sshkarupa/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sshkarupa/flashcards/merges","archive_url":"https://api.github.com/repos/sshkarupa/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sshkarupa/flashcards/downloads","issues_url":"https://api.github.com/repos/sshkarupa/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sshkarupa/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sshkarupa/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sshkarupa/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sshkarupa/flashcards/releases{/id}","created_at":"2015-03-14T12:36:54Z","updated_at":"2015-03-19T09:54:11Z","pushed_at":"2015-03-20T14:14:30Z","git_url":"git://github.com/sshkarupa/flashcards.git","ssh_url":"git@github.com:sshkarupa/flashcards.git","clone_url":"https://github.com/sshkarupa/flashcards.git","svn_url":"https://github.com/sshkarupa/flashcards","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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sshkarupa:master","ref":"master","sha":"71211f20c828c0bca1787d1e5aa93be92a9e6d8c","user":{"login":"sshkarupa","id":10585770,"avatar_url":"https://avatars.githubusercontent.com/u/10585770?v=3","gravatar_id":"","url":"https://api.github.com/users/sshkarupa","html_url":"https://github.com/sshkarupa","followers_url":"https://api.github.com/users/sshkarupa/followers","following_url":"https://api.github.com/users/sshkarupa/following{/other_user}","gists_url":"https://api.github.com/users/sshkarupa/gists{/gist_id}","starred_url":"https://api.github.com/users/sshkarupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshkarupa/subscriptions","organizations_url":"https://api.github.com/users/sshkarupa/orgs","repos_url":"https://api.github.com/users/sshkarupa/repos","events_url":"https://api.github.com/users/sshkarupa/events{/privacy}","received_events_url":"https://api.github.com/users/sshkarupa/received_events","type":"User","site_admin":false},"repo":{"id":32210929,"name":"flashcards","full_name":"sshkarupa/flashcards","owner":{"login":"sshkarupa","id":10585770,"avatar_url":"https://avatars.githubusercontent.com/u/10585770?v=3","gravatar_id":"","url":"https://api.github.com/users/sshkarupa","html_url":"https://github.com/sshkarupa","followers_url":"https://api.github.com/users/sshkarupa/followers","following_url":"https://api.github.com/users/sshkarupa/following{/other_user}","gists_url":"https://api.github.com/users/sshkarupa/gists{/gist_id}","starred_url":"https://api.github.com/users/sshkarupa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshkarupa/subscriptions","organizations_url":"https://api.github.com/users/sshkarupa/orgs","repos_url":"https://api.github.com/users/sshkarupa/repos","events_url":"https://api.github.com/users/sshkarupa/events{/privacy}","received_events_url":"https://api.github.com/users/sshkarupa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sshkarupa/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sshkarupa/flashcards","forks_url":"https://api.github.com/repos/sshkarupa/flashcards/forks","keys_url":"https://api.github.com/repos/sshkarupa/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sshkarupa/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sshkarupa/flashcards/teams","hooks_url":"https://api.github.com/repos/sshkarupa/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sshkarupa/flashcards/events","assignees_url":"https://api.github.com/repos/sshkarupa/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sshkarupa/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sshkarupa/flashcards/tags","blobs_url":"https://api.github.com/repos/sshkarupa/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sshkarupa/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sshkarupa/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sshkarupa/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sshkarupa/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sshkarupa/flashcards/languages","stargazers_url":"https://api.github.com/repos/sshkarupa/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sshkarupa/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sshkarupa/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sshkarupa/flashcards/subscription","commits_url":"https://api.github.com/repos/sshkarupa/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sshkarupa/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sshkarupa/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sshkarupa/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sshkarupa/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sshkarupa/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sshkarupa/flashcards/merges","archive_url":"https://api.github.com/repos/sshkarupa/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sshkarupa/flashcards/downloads","issues_url":"https://api.github.com/repos/sshkarupa/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sshkarupa/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sshkarupa/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sshkarupa/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sshkarupa/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sshkarupa/flashcards/releases{/id}","created_at":"2015-03-14T12:36:54Z","updated_at":"2015-03-19T09:54:11Z","pushed_at":"2015-03-20T14:14:30Z","git_url":"git://github.com/sshkarupa/flashcards.git","ssh_url":"git@github.com:sshkarupa/flashcards.git","clone_url":"https://github.com/sshkarupa/flashcards.git","svn_url":"https://github.com/sshkarupa/flashcards","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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4"},"html":{"href":"https://github.com/sshkarupa/flashcards/pull/4"},"issue":{"href":"https://api.github.com/repos/sshkarupa/flashcards/issues/4"},"comments":{"href":"https://api.github.com/repos/sshkarupa/flashcards/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sshkarupa/flashcards/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/sshkarupa/flashcards/statuses/7117233b06f325363e547c9ec57c2bd8ed867eb2"}}}}