{"action":"created","comment":{"url":"https://api.github.com/repos/Pudlovich/mks/pulls/comments/62554343","id":62554343,"diff_hunk":"@@ -0,0 +1,39 @@\n+class ParcelsController < ApplicationController\n+  rescue_from ActiveRecord::RecordNotFound, with: :rescue_not_found\n+\n+  def index\n+    if current_user\n+      @parcels = current_user.parcels.order(created_at: :desc)\n+    end\n+  end\n+\n+  def new\n+    @parcel = Parcel.new\n+  end\n+\n+  def create\n+    @parcel = Parcel.new(parcel_params)\n+    if current_user\n+      @parcel.sender = current_user\n+    end\n+    if @parcel.save\n+      redirect_to parcel_path(parcel_number: @parcel.parcel_number), notice: t('.parcel_created_succesfully')","path":"app/controllers/parcels_controller.rb","position":20,"original_position":20,"commit_id":"9ed29d7df44e86a977256eb97838fda2d6c830f1","original_commit_id":"9ed29d7df44e86a977256eb97838fda2d6c830f1","user":{"login":"marekstanisz","id":7835746,"avatar_url":"https://avatars.githubusercontent.com/u/7835746?v=3","gravatar_id":"","url":"https://api.github.com/users/marekstanisz","html_url":"https://github.com/marekstanisz","followers_url":"https://api.github.com/users/marekstanisz/followers","following_url":"https://api.github.com/users/marekstanisz/following{/other_user}","gists_url":"https://api.github.com/users/marekstanisz/gists{/gist_id}","starred_url":"https://api.github.com/users/marekstanisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekstanisz/subscriptions","organizations_url":"https://api.github.com/users/marekstanisz/orgs","repos_url":"https://api.github.com/users/marekstanisz/repos","events_url":"https://api.github.com/users/marekstanisz/events{/privacy}","received_events_url":"https://api.github.com/users/marekstanisz/received_events","type":"User","site_admin":false},"body":"To `parcel_number:` nie jest chyba konieczne?","created_at":"2016-05-09T19:03:49Z","updated_at":"2016-05-09T19:03:49Z","html_url":"https://github.com/Pudlovich/mks/pull/4#discussion_r62554343","pull_request_url":"https://api.github.com/repos/Pudlovich/mks/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Pudlovich/mks/pulls/comments/62554343"},"html":{"href":"https://github.com/Pudlovich/mks/pull/4#discussion_r62554343"},"pull_request":{"href":"https://api.github.com/repos/Pudlovich/mks/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Pudlovich/mks/pulls/4","id":68744204,"html_url":"https://github.com/Pudlovich/mks/pull/4","diff_url":"https://github.com/Pudlovich/mks/pull/4.diff","patch_url":"https://github.com/Pudlovich/mks/pull/4.patch","issue_url":"https://api.github.com/repos/Pudlovich/mks/issues/4","number":4,"state":"open","locked":false,"title":"Parcel","user":{"login":"Pudlovich","id":12862770,"avatar_url":"https://avatars.githubusercontent.com/u/12862770?v=3","gravatar_id":"","url":"https://api.github.com/users/Pudlovich","html_url":"https://github.com/Pudlovich","followers_url":"https://api.github.com/users/Pudlovich/followers","following_url":"https://api.github.com/users/Pudlovich/following{/other_user}","gists_url":"https://api.github.com/users/Pudlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Pudlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pudlovich/subscriptions","organizations_url":"https://api.github.com/users/Pudlovich/orgs","repos_url":"https://api.github.com/users/Pudlovich/repos","events_url":"https://api.github.com/users/Pudlovich/events{/privacy}","received_events_url":"https://api.github.com/users/Pudlovich/received_events","type":"User","site_admin":false},"body":"Branched from i18n branch, contains basic setup of parcel management:\r\n- logged-in user can create parcel\r\n- unregistered user can create parcel\r\n- logged_in user can view his parcel\r\n- user can access detailed views of his parcels.","created_at":"2016-05-03T17:34:24Z","updated_at":"2016-05-09T19:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbd4a1320b439d7fdb3fe276e5831f6a03d9e5cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Pudlovich/mks/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Pudlovich/mks/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Pudlovich/mks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pudlovich/mks/issues/4/comments","statuses_url":"https://api.github.com/repos/Pudlovich/mks/statuses/9ed29d7df44e86a977256eb97838fda2d6c830f1","head":{"label":"Pudlovich:parcel","ref":"parcel","sha":"9ed29d7df44e86a977256eb97838fda2d6c830f1","user":{"login":"Pudlovich","id":12862770,"avatar_url":"https://avatars.githubusercontent.com/u/12862770?v=3","gravatar_id":"","url":"https://api.github.com/users/Pudlovich","html_url":"https://github.com/Pudlovich","followers_url":"https://api.github.com/users/Pudlovich/followers","following_url":"https://api.github.com/users/Pudlovich/following{/other_user}","gists_url":"https://api.github.com/users/Pudlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Pudlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pudlovich/subscriptions","organizations_url":"https://api.github.com/users/Pudlovich/orgs","repos_url":"https://api.github.com/users/Pudlovich/repos","events_url":"https://api.github.com/users/Pudlovich/events{/privacy}","received_events_url":"https://api.github.com/users/Pudlovich/received_events","type":"User","site_admin":false},"repo":{"id":55363791,"name":"mks","full_name":"Pudlovich/mks","owner":{"login":"Pudlovich","id":12862770,"avatar_url":"https://avatars.githubusercontent.com/u/12862770?v=3","gravatar_id":"","url":"https://api.github.com/users/Pudlovich","html_url":"https://github.com/Pudlovich","followers_url":"https://api.github.com/users/Pudlovich/followers","following_url":"https://api.github.com/users/Pudlovich/following{/other_user}","gists_url":"https://api.github.com/users/Pudlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Pudlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pudlovich/subscriptions","organizations_url":"https://api.github.com/users/Pudlovich/orgs","repos_url":"https://api.github.com/users/Pudlovich/repos","events_url":"https://api.github.com/users/Pudlovich/events{/privacy}","received_events_url":"https://api.github.com/users/Pudlovich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pudlovich/mks","description":"","fork":false,"url":"https://api.github.com/repos/Pudlovich/mks","forks_url":"https://api.github.com/repos/Pudlovich/mks/forks","keys_url":"https://api.github.com/repos/Pudlovich/mks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pudlovich/mks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pudlovich/mks/teams","hooks_url":"https://api.github.com/repos/Pudlovich/mks/hooks","issue_events_url":"https://api.github.com/repos/Pudlovich/mks/issues/events{/number}","events_url":"https://api.github.com/repos/Pudlovich/mks/events","assignees_url":"https://api.github.com/repos/Pudlovich/mks/assignees{/user}","branches_url":"https://api.github.com/repos/Pudlovich/mks/branches{/branch}","tags_url":"https://api.github.com/repos/Pudlovich/mks/tags","blobs_url":"https://api.github.com/repos/Pudlovich/mks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pudlovich/mks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pudlovich/mks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pudlovich/mks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pudlovich/mks/statuses/{sha}","languages_url":"https://api.github.com/repos/Pudlovich/mks/languages","stargazers_url":"https://api.github.com/repos/Pudlovich/mks/stargazers","contributors_url":"https://api.github.com/repos/Pudlovich/mks/contributors","subscribers_url":"https://api.github.com/repos/Pudlovich/mks/subscribers","subscription_url":"https://api.github.com/repos/Pudlovich/mks/subscription","commits_url":"https://api.github.com/repos/Pudlovich/mks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pudlovich/mks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pudlovich/mks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pudlovich/mks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pudlovich/mks/contents/{+path}","compare_url":"https://api.github.com/repos/Pudlovich/mks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pudlovich/mks/merges","archive_url":"https://api.github.com/repos/Pudlovich/mks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pudlovich/mks/downloads","issues_url":"https://api.github.com/repos/Pudlovich/mks/issues{/number}","pulls_url":"https://api.github.com/repos/Pudlovich/mks/pulls{/number}","milestones_url":"https://api.github.com/repos/Pudlovich/mks/milestones{/number}","notifications_url":"https://api.github.com/repos/Pudlovich/mks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pudlovich/mks/labels{/name}","releases_url":"https://api.github.com/repos/Pudlovich/mks/releases{/id}","deployments_url":"https://api.github.com/repos/Pudlovich/mks/deployments","created_at":"2016-04-03T19:09:13Z","updated_at":"2016-04-03T19:12:00Z","pushed_at":"2016-05-08T23:01:00Z","git_url":"git://github.com/Pudlovich/mks.git","ssh_url":"git@github.com:Pudlovich/mks.git","clone_url":"https://github.com/Pudlovich/mks.git","svn_url":"https://github.com/Pudlovich/mks","homepage":null,"size":115,"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":"Pudlovich:master","ref":"master","sha":"ce0e2c5b67c1ec6b2d7e7c77fb4742ad2a5026df","user":{"login":"Pudlovich","id":12862770,"avatar_url":"https://avatars.githubusercontent.com/u/12862770?v=3","gravatar_id":"","url":"https://api.github.com/users/Pudlovich","html_url":"https://github.com/Pudlovich","followers_url":"https://api.github.com/users/Pudlovich/followers","following_url":"https://api.github.com/users/Pudlovich/following{/other_user}","gists_url":"https://api.github.com/users/Pudlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Pudlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pudlovich/subscriptions","organizations_url":"https://api.github.com/users/Pudlovich/orgs","repos_url":"https://api.github.com/users/Pudlovich/repos","events_url":"https://api.github.com/users/Pudlovich/events{/privacy}","received_events_url":"https://api.github.com/users/Pudlovich/received_events","type":"User","site_admin":false},"repo":{"id":55363791,"name":"mks","full_name":"Pudlovich/mks","owner":{"login":"Pudlovich","id":12862770,"avatar_url":"https://avatars.githubusercontent.com/u/12862770?v=3","gravatar_id":"","url":"https://api.github.com/users/Pudlovich","html_url":"https://github.com/Pudlovich","followers_url":"https://api.github.com/users/Pudlovich/followers","following_url":"https://api.github.com/users/Pudlovich/following{/other_user}","gists_url":"https://api.github.com/users/Pudlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Pudlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pudlovich/subscriptions","organizations_url":"https://api.github.com/users/Pudlovich/orgs","repos_url":"https://api.github.com/users/Pudlovich/repos","events_url":"https://api.github.com/users/Pudlovich/events{/privacy}","received_events_url":"https://api.github.com/users/Pudlovich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pudlovich/mks","description":"","fork":false,"url":"https://api.github.com/repos/Pudlovich/mks","forks_url":"https://api.github.com/repos/Pudlovich/mks/forks","keys_url":"https://api.github.com/repos/Pudlovich/mks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pudlovich/mks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pudlovich/mks/teams","hooks_url":"https://api.github.com/repos/Pudlovich/mks/hooks","issue_events_url":"https://api.github.com/repos/Pudlovich/mks/issues/events{/number}","events_url":"https://api.github.com/repos/Pudlovich/mks/events","assignees_url":"https://api.github.com/repos/Pudlovich/mks/assignees{/user}","branches_url":"https://api.github.com/repos/Pudlovich/mks/branches{/branch}","tags_url":"https://api.github.com/repos/Pudlovich/mks/tags","blobs_url":"https://api.github.com/repos/Pudlovich/mks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pudlovich/mks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pudlovich/mks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pudlovich/mks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pudlovich/mks/statuses/{sha}","languages_url":"https://api.github.com/repos/Pudlovich/mks/languages","stargazers_url":"https://api.github.com/repos/Pudlovich/mks/stargazers","contributors_url":"https://api.github.com/repos/Pudlovich/mks/contributors","subscribers_url":"https://api.github.com/repos/Pudlovich/mks/subscribers","subscription_url":"https://api.github.com/repos/Pudlovich/mks/subscription","commits_url":"https://api.github.com/repos/Pudlovich/mks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pudlovich/mks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pudlovich/mks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pudlovich/mks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pudlovich/mks/contents/{+path}","compare_url":"https://api.github.com/repos/Pudlovich/mks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pudlovich/mks/merges","archive_url":"https://api.github.com/repos/Pudlovich/mks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pudlovich/mks/downloads","issues_url":"https://api.github.com/repos/Pudlovich/mks/issues{/number}","pulls_url":"https://api.github.com/repos/Pudlovich/mks/pulls{/number}","milestones_url":"https://api.github.com/repos/Pudlovich/mks/milestones{/number}","notifications_url":"https://api.github.com/repos/Pudlovich/mks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pudlovich/mks/labels{/name}","releases_url":"https://api.github.com/repos/Pudlovich/mks/releases{/id}","deployments_url":"https://api.github.com/repos/Pudlovich/mks/deployments","created_at":"2016-04-03T19:09:13Z","updated_at":"2016-04-03T19:12:00Z","pushed_at":"2016-05-08T23:01:00Z","git_url":"git://github.com/Pudlovich/mks.git","ssh_url":"git@github.com:Pudlovich/mks.git","clone_url":"https://github.com/Pudlovich/mks.git","svn_url":"https://github.com/Pudlovich/mks","homepage":null,"size":115,"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/Pudlovich/mks/pulls/4"},"html":{"href":"https://github.com/Pudlovich/mks/pull/4"},"issue":{"href":"https://api.github.com/repos/Pudlovich/mks/issues/4"},"comments":{"href":"https://api.github.com/repos/Pudlovich/mks/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Pudlovich/mks/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Pudlovich/mks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pudlovich/mks/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Pudlovich/mks/statuses/9ed29d7df44e86a977256eb97838fda2d6c830f1"}}}}