{"action":"created","comment":{"url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/comments/24313731","id":24313731,"diff_hunk":"@@ -0,0 +1,63 @@\n+class PacksController < ApplicationController\n+  before_action :find_pack, only: [:edit, :show, :update, :destroy]\n+  before_action :get_current_pack_numb, only: [:index, :show]\n+\n+  def index\n+    @packs = current_user.packs.all\n+  end\n+\n+  def show\n+  end\n+\n+  def new\n+    @pack = current_user.packs.new\n+  end\n+\n+  def create\n+    @pack = current_user.packs.build(pack_params)\n+    if @pack.save\n+      flash[:success] = \"Колода успешно создана\"\n+      redirect_to @pack\n+    else\n+      render :new\n+    end\n+  end\n+\n+  def update\n+    if @pack.update_attributes(pack_params)\n+      flash[:success] = \"Колода обновлена\"\n+      redirect_to @pack\n+    else\n+      render :edit\n+    end\n+  end\n+\n+  def edit\n+  end\n+\n+  def destroy\n+    @pack.destroy\n+    flash[:success] = \"Колода удалена\"\n+    redirect_to packs_url\n+  end\n+\n+  def set_current_pack\n+    session[:pack_id] = params[:pack_id]\n+    respond_to do |format|\n+      format.js\n+    end\n+  end\n+\n+  private\n+    def pack_params\n+      params.require(:pack).permit(:title, :image)\n+    end\n+\n+    def find_pack\n+      @pack = current_user.packs.find(params[:id])\n+    end\n+\n+    def get_current_pack_numb","path":"app/controllers/packs_controller.rb","position":60,"original_position":60,"commit_id":"24a7a4599037cb2a789b370af383097567732b8b","original_commit_id":"24a7a4599037cb2a789b370af383097567732b8b","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":"Inconsistent indentation detected.","created_at":"2015-02-09T08:22:12Z","updated_at":"2015-02-09T08:22:12Z","html_url":"https://github.com/DmitriyManaev/flashcards/pull/10#discussion_r24313731","pull_request_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/comments/24313731"},"html":{"href":"https://github.com/DmitriyManaev/flashcards/pull/10#discussion_r24313731"},"pull_request":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10","id":28903009,"html_url":"https://github.com/DmitriyManaev/flashcards/pull/10","diff_url":"https://github.com/DmitriyManaev/flashcards/pull/10.diff","patch_url":"https://github.com/DmitriyManaev/flashcards/pull/10.patch","issue_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/10","number":10,"state":"open","locked":false,"title":"Add Packs and some styles","user":{"login":"DmitriyManaev","id":6985097,"avatar_url":"https://avatars.githubusercontent.com/u/6985097?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitriyManaev","html_url":"https://github.com/DmitriyManaev","followers_url":"https://api.github.com/users/DmitriyManaev/followers","following_url":"https://api.github.com/users/DmitriyManaev/following{/other_user}","gists_url":"https://api.github.com/users/DmitriyManaev/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitriyManaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitriyManaev/subscriptions","organizations_url":"https://api.github.com/users/DmitriyManaev/orgs","repos_url":"https://api.github.com/users/DmitriyManaev/repos","events_url":"https://api.github.com/users/DmitriyManaev/events{/privacy}","received_events_url":"https://api.github.com/users/DmitriyManaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-09T08:22:00Z","updated_at":"2015-02-09T08:22:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc1cd2086170c4bc7348d542361ba1e998841175","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10/commits","review_comments_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10/comments","review_comment_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/10/comments","statuses_url":"https://api.github.com/repos/DmitriyManaev/flashcards/statuses/24a7a4599037cb2a789b370af383097567732b8b","head":{"label":"DmitriyManaev:tenth-task","ref":"tenth-task","sha":"24a7a4599037cb2a789b370af383097567732b8b","user":{"login":"DmitriyManaev","id":6985097,"avatar_url":"https://avatars.githubusercontent.com/u/6985097?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitriyManaev","html_url":"https://github.com/DmitriyManaev","followers_url":"https://api.github.com/users/DmitriyManaev/followers","following_url":"https://api.github.com/users/DmitriyManaev/following{/other_user}","gists_url":"https://api.github.com/users/DmitriyManaev/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitriyManaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitriyManaev/subscriptions","organizations_url":"https://api.github.com/users/DmitriyManaev/orgs","repos_url":"https://api.github.com/users/DmitriyManaev/repos","events_url":"https://api.github.com/users/DmitriyManaev/events{/privacy}","received_events_url":"https://api.github.com/users/DmitriyManaev/received_events","type":"User","site_admin":false},"repo":{"id":29655661,"name":"flashcards","full_name":"DmitriyManaev/flashcards","owner":{"login":"DmitriyManaev","id":6985097,"avatar_url":"https://avatars.githubusercontent.com/u/6985097?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitriyManaev","html_url":"https://github.com/DmitriyManaev","followers_url":"https://api.github.com/users/DmitriyManaev/followers","following_url":"https://api.github.com/users/DmitriyManaev/following{/other_user}","gists_url":"https://api.github.com/users/DmitriyManaev/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitriyManaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitriyManaev/subscriptions","organizations_url":"https://api.github.com/users/DmitriyManaev/orgs","repos_url":"https://api.github.com/users/DmitriyManaev/repos","events_url":"https://api.github.com/users/DmitriyManaev/events{/privacy}","received_events_url":"https://api.github.com/users/DmitriyManaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DmitriyManaev/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/DmitriyManaev/flashcards","forks_url":"https://api.github.com/repos/DmitriyManaev/flashcards/forks","keys_url":"https://api.github.com/repos/DmitriyManaev/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DmitriyManaev/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DmitriyManaev/flashcards/teams","hooks_url":"https://api.github.com/repos/DmitriyManaev/flashcards/hooks","issue_events_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/DmitriyManaev/flashcards/events","assignees_url":"https://api.github.com/repos/DmitriyManaev/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/DmitriyManaev/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/DmitriyManaev/flashcards/tags","blobs_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DmitriyManaev/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/DmitriyManaev/flashcards/languages","stargazers_url":"https://api.github.com/repos/DmitriyManaev/flashcards/stargazers","contributors_url":"https://api.github.com/repos/DmitriyManaev/flashcards/contributors","subscribers_url":"https://api.github.com/repos/DmitriyManaev/flashcards/subscribers","subscription_url":"https://api.github.com/repos/DmitriyManaev/flashcards/subscription","commits_url":"https://api.github.com/repos/DmitriyManaev/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/DmitriyManaev/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/comments/{number}","contents_url":"https://api.github.com/repos/DmitriyManaev/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/DmitriyManaev/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DmitriyManaev/flashcards/merges","archive_url":"https://api.github.com/repos/DmitriyManaev/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DmitriyManaev/flashcards/downloads","issues_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/DmitriyManaev/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/DmitriyManaev/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DmitriyManaev/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/DmitriyManaev/flashcards/releases{/id}","created_at":"2015-01-22T04:27:35Z","updated_at":"2015-02-05T15:31:35Z","pushed_at":"2015-02-09T08:20:46Z","git_url":"git://github.com/DmitriyManaev/flashcards.git","ssh_url":"git@github.com:DmitriyManaev/flashcards.git","clone_url":"https://github.com/DmitriyManaev/flashcards.git","svn_url":"https://github.com/DmitriyManaev/flashcards","homepage":null,"size":752,"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":"DmitriyManaev:master","ref":"master","sha":"3c5c750a463eb3449a1caa7bb5ef2c1ad6b9b564","user":{"login":"DmitriyManaev","id":6985097,"avatar_url":"https://avatars.githubusercontent.com/u/6985097?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitriyManaev","html_url":"https://github.com/DmitriyManaev","followers_url":"https://api.github.com/users/DmitriyManaev/followers","following_url":"https://api.github.com/users/DmitriyManaev/following{/other_user}","gists_url":"https://api.github.com/users/DmitriyManaev/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitriyManaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitriyManaev/subscriptions","organizations_url":"https://api.github.com/users/DmitriyManaev/orgs","repos_url":"https://api.github.com/users/DmitriyManaev/repos","events_url":"https://api.github.com/users/DmitriyManaev/events{/privacy}","received_events_url":"https://api.github.com/users/DmitriyManaev/received_events","type":"User","site_admin":false},"repo":{"id":29655661,"name":"flashcards","full_name":"DmitriyManaev/flashcards","owner":{"login":"DmitriyManaev","id":6985097,"avatar_url":"https://avatars.githubusercontent.com/u/6985097?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitriyManaev","html_url":"https://github.com/DmitriyManaev","followers_url":"https://api.github.com/users/DmitriyManaev/followers","following_url":"https://api.github.com/users/DmitriyManaev/following{/other_user}","gists_url":"https://api.github.com/users/DmitriyManaev/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitriyManaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitriyManaev/subscriptions","organizations_url":"https://api.github.com/users/DmitriyManaev/orgs","repos_url":"https://api.github.com/users/DmitriyManaev/repos","events_url":"https://api.github.com/users/DmitriyManaev/events{/privacy}","received_events_url":"https://api.github.com/users/DmitriyManaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DmitriyManaev/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/DmitriyManaev/flashcards","forks_url":"https://api.github.com/repos/DmitriyManaev/flashcards/forks","keys_url":"https://api.github.com/repos/DmitriyManaev/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DmitriyManaev/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DmitriyManaev/flashcards/teams","hooks_url":"https://api.github.com/repos/DmitriyManaev/flashcards/hooks","issue_events_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/DmitriyManaev/flashcards/events","assignees_url":"https://api.github.com/repos/DmitriyManaev/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/DmitriyManaev/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/DmitriyManaev/flashcards/tags","blobs_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DmitriyManaev/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/DmitriyManaev/flashcards/languages","stargazers_url":"https://api.github.com/repos/DmitriyManaev/flashcards/stargazers","contributors_url":"https://api.github.com/repos/DmitriyManaev/flashcards/contributors","subscribers_url":"https://api.github.com/repos/DmitriyManaev/flashcards/subscribers","subscription_url":"https://api.github.com/repos/DmitriyManaev/flashcards/subscription","commits_url":"https://api.github.com/repos/DmitriyManaev/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/DmitriyManaev/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/DmitriyManaev/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/comments/{number}","contents_url":"https://api.github.com/repos/DmitriyManaev/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/DmitriyManaev/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DmitriyManaev/flashcards/merges","archive_url":"https://api.github.com/repos/DmitriyManaev/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DmitriyManaev/flashcards/downloads","issues_url":"https://api.github.com/repos/DmitriyManaev/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/DmitriyManaev/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/DmitriyManaev/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DmitriyManaev/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/DmitriyManaev/flashcards/releases{/id}","created_at":"2015-01-22T04:27:35Z","updated_at":"2015-02-05T15:31:35Z","pushed_at":"2015-02-09T08:20:46Z","git_url":"git://github.com/DmitriyManaev/flashcards.git","ssh_url":"git@github.com:DmitriyManaev/flashcards.git","clone_url":"https://github.com/DmitriyManaev/flashcards.git","svn_url":"https://github.com/DmitriyManaev/flashcards","homepage":null,"size":752,"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/DmitriyManaev/flashcards/pulls/10"},"html":{"href":"https://github.com/DmitriyManaev/flashcards/pull/10"},"issue":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/10"},"comments":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/DmitriyManaev/flashcards/statuses/24a7a4599037cb2a789b370af383097567732b8b"}}}}