{"action":"created","comment":{"url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/comments/44208902","id":44208902,"diff_hunk":"@@ -1,31 +1,24 @@\n-angular.module('travelerjs').controller('CountryFormController', function($scope, $routeParams, $location, formAction){\n-    $scope.countries = localStorage['countries'] ? JSON.parse(localStorage['countries']) : [];\n-\n-    if(formAction === 'edit') {\n-        angular.forEach($scope.countries, function (country, index) {\n-            if ($routeParams.slug == country.name) {\n-                $scope.countryIndex = index;\n-                $scope.country = country;\n-            }\n-        });\n-    }\n+angular.module('travelerjs').controller('CountryFormController', ['$scope', '$route', '$location', 'formAction',\n+    'Countries', 'Place',  function($scope, $route, $location, formAction, Countries, Place){\n+        if(formAction === 'create'){","path":"CountryFormController.js","position":14,"original_position":14,"commit_id":"00da699821b651cb0d2589a67ece8aecfca210e8","original_commit_id":"00da699821b651cb0d2589a67ece8aecfca210e8","user":{"login":"anaumov","id":1510570,"avatar_url":"https://avatars.githubusercontent.com/u/1510570?v=3","gravatar_id":"","url":"https://api.github.com/users/anaumov","html_url":"https://github.com/anaumov","followers_url":"https://api.github.com/users/anaumov/followers","following_url":"https://api.github.com/users/anaumov/following{/other_user}","gists_url":"https://api.github.com/users/anaumov/gists{/gist_id}","starred_url":"https://api.github.com/users/anaumov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anaumov/subscriptions","organizations_url":"https://api.github.com/users/anaumov/orgs","repos_url":"https://api.github.com/users/anaumov/repos","events_url":"https://api.github.com/users/anaumov/events{/privacy}","received_events_url":"https://api.github.com/users/anaumov/received_events","type":"User","site_admin":false},"body":"Разбей на два контроллера, этот formAction только добавляет путаницы.","created_at":"2015-11-07T06:42:15Z","updated_at":"2015-11-07T06:42:15Z","html_url":"https://github.com/mrGhosd/travelerjs/pull/4#discussion_r44208902","pull_request_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/comments/44208902"},"html":{"href":"https://github.com/mrGhosd/travelerjs/pull/4#discussion_r44208902"},"pull_request":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4","id":49989874,"html_url":"https://github.com/mrGhosd/travelerjs/pull/4","diff_url":"https://github.com/mrGhosd/travelerjs/pull/4.diff","patch_url":"https://github.com/mrGhosd/travelerjs/pull/4.patch","issue_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/4","number":4,"state":"open","locked":false,"title":"Lesson 4 angular background","user":{"login":"mrGhosd","id":6382765,"avatar_url":"https://avatars.githubusercontent.com/u/6382765?v=3","gravatar_id":"","url":"https://api.github.com/users/mrGhosd","html_url":"https://github.com/mrGhosd","followers_url":"https://api.github.com/users/mrGhosd/followers","following_url":"https://api.github.com/users/mrGhosd/following{/other_user}","gists_url":"https://api.github.com/users/mrGhosd/gists{/gist_id}","starred_url":"https://api.github.com/users/mrGhosd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrGhosd/subscriptions","organizations_url":"https://api.github.com/users/mrGhosd/orgs","repos_url":"https://api.github.com/users/mrGhosd/repos","events_url":"https://api.github.com/users/mrGhosd/events{/privacy}","received_events_url":"https://api.github.com/users/mrGhosd/received_events","type":"User","site_admin":false},"body":"Make all tasks from lesson #4","created_at":"2015-11-06T18:47:50Z","updated_at":"2015-11-07T06:42:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d5e81881b4c9afb95c13eba0575c06aad8a3a8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4/commits","review_comments_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4/comments","review_comment_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/4/comments","statuses_url":"https://api.github.com/repos/mrGhosd/travelerjs/statuses/00da699821b651cb0d2589a67ece8aecfca210e8","head":{"label":"mrGhosd:lesson-4-angular-background","ref":"lesson-4-angular-background","sha":"00da699821b651cb0d2589a67ece8aecfca210e8","user":{"login":"mrGhosd","id":6382765,"avatar_url":"https://avatars.githubusercontent.com/u/6382765?v=3","gravatar_id":"","url":"https://api.github.com/users/mrGhosd","html_url":"https://github.com/mrGhosd","followers_url":"https://api.github.com/users/mrGhosd/followers","following_url":"https://api.github.com/users/mrGhosd/following{/other_user}","gists_url":"https://api.github.com/users/mrGhosd/gists{/gist_id}","starred_url":"https://api.github.com/users/mrGhosd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrGhosd/subscriptions","organizations_url":"https://api.github.com/users/mrGhosd/orgs","repos_url":"https://api.github.com/users/mrGhosd/repos","events_url":"https://api.github.com/users/mrGhosd/events{/privacy}","received_events_url":"https://api.github.com/users/mrGhosd/received_events","type":"User","site_admin":false},"repo":{"id":44436620,"name":"travelerjs","full_name":"mrGhosd/travelerjs","owner":{"login":"mrGhosd","id":6382765,"avatar_url":"https://avatars.githubusercontent.com/u/6382765?v=3","gravatar_id":"","url":"https://api.github.com/users/mrGhosd","html_url":"https://github.com/mrGhosd","followers_url":"https://api.github.com/users/mrGhosd/followers","following_url":"https://api.github.com/users/mrGhosd/following{/other_user}","gists_url":"https://api.github.com/users/mrGhosd/gists{/gist_id}","starred_url":"https://api.github.com/users/mrGhosd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrGhosd/subscriptions","organizations_url":"https://api.github.com/users/mrGhosd/orgs","repos_url":"https://api.github.com/users/mrGhosd/repos","events_url":"https://api.github.com/users/mrGhosd/events{/privacy}","received_events_url":"https://api.github.com/users/mrGhosd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrGhosd/travelerjs","description":"Study project for thinknetica course","fork":false,"url":"https://api.github.com/repos/mrGhosd/travelerjs","forks_url":"https://api.github.com/repos/mrGhosd/travelerjs/forks","keys_url":"https://api.github.com/repos/mrGhosd/travelerjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrGhosd/travelerjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrGhosd/travelerjs/teams","hooks_url":"https://api.github.com/repos/mrGhosd/travelerjs/hooks","issue_events_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/events{/number}","events_url":"https://api.github.com/repos/mrGhosd/travelerjs/events","assignees_url":"https://api.github.com/repos/mrGhosd/travelerjs/assignees{/user}","branches_url":"https://api.github.com/repos/mrGhosd/travelerjs/branches{/branch}","tags_url":"https://api.github.com/repos/mrGhosd/travelerjs/tags","blobs_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrGhosd/travelerjs/statuses/{sha}","languages_url":"https://api.github.com/repos/mrGhosd/travelerjs/languages","stargazers_url":"https://api.github.com/repos/mrGhosd/travelerjs/stargazers","contributors_url":"https://api.github.com/repos/mrGhosd/travelerjs/contributors","subscribers_url":"https://api.github.com/repos/mrGhosd/travelerjs/subscribers","subscription_url":"https://api.github.com/repos/mrGhosd/travelerjs/subscription","commits_url":"https://api.github.com/repos/mrGhosd/travelerjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrGhosd/travelerjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrGhosd/travelerjs/contents/{+path}","compare_url":"https://api.github.com/repos/mrGhosd/travelerjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrGhosd/travelerjs/merges","archive_url":"https://api.github.com/repos/mrGhosd/travelerjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrGhosd/travelerjs/downloads","issues_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues{/number}","pulls_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls{/number}","milestones_url":"https://api.github.com/repos/mrGhosd/travelerjs/milestones{/number}","notifications_url":"https://api.github.com/repos/mrGhosd/travelerjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrGhosd/travelerjs/labels{/name}","releases_url":"https://api.github.com/repos/mrGhosd/travelerjs/releases{/id}","created_at":"2015-10-17T12:42:06Z","updated_at":"2015-10-26T17:33:00Z","pushed_at":"2015-11-06T18:47:50Z","git_url":"git://github.com/mrGhosd/travelerjs.git","ssh_url":"git@github.com:mrGhosd/travelerjs.git","clone_url":"https://github.com/mrGhosd/travelerjs.git","svn_url":"https://github.com/mrGhosd/travelerjs","homepage":null,"size":10284,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"mrGhosd:master","ref":"master","sha":"504c0c5271d1888dd2babad4135aef154a5583a3","user":{"login":"mrGhosd","id":6382765,"avatar_url":"https://avatars.githubusercontent.com/u/6382765?v=3","gravatar_id":"","url":"https://api.github.com/users/mrGhosd","html_url":"https://github.com/mrGhosd","followers_url":"https://api.github.com/users/mrGhosd/followers","following_url":"https://api.github.com/users/mrGhosd/following{/other_user}","gists_url":"https://api.github.com/users/mrGhosd/gists{/gist_id}","starred_url":"https://api.github.com/users/mrGhosd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrGhosd/subscriptions","organizations_url":"https://api.github.com/users/mrGhosd/orgs","repos_url":"https://api.github.com/users/mrGhosd/repos","events_url":"https://api.github.com/users/mrGhosd/events{/privacy}","received_events_url":"https://api.github.com/users/mrGhosd/received_events","type":"User","site_admin":false},"repo":{"id":44436620,"name":"travelerjs","full_name":"mrGhosd/travelerjs","owner":{"login":"mrGhosd","id":6382765,"avatar_url":"https://avatars.githubusercontent.com/u/6382765?v=3","gravatar_id":"","url":"https://api.github.com/users/mrGhosd","html_url":"https://github.com/mrGhosd","followers_url":"https://api.github.com/users/mrGhosd/followers","following_url":"https://api.github.com/users/mrGhosd/following{/other_user}","gists_url":"https://api.github.com/users/mrGhosd/gists{/gist_id}","starred_url":"https://api.github.com/users/mrGhosd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrGhosd/subscriptions","organizations_url":"https://api.github.com/users/mrGhosd/orgs","repos_url":"https://api.github.com/users/mrGhosd/repos","events_url":"https://api.github.com/users/mrGhosd/events{/privacy}","received_events_url":"https://api.github.com/users/mrGhosd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrGhosd/travelerjs","description":"Study project for thinknetica course","fork":false,"url":"https://api.github.com/repos/mrGhosd/travelerjs","forks_url":"https://api.github.com/repos/mrGhosd/travelerjs/forks","keys_url":"https://api.github.com/repos/mrGhosd/travelerjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrGhosd/travelerjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrGhosd/travelerjs/teams","hooks_url":"https://api.github.com/repos/mrGhosd/travelerjs/hooks","issue_events_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/events{/number}","events_url":"https://api.github.com/repos/mrGhosd/travelerjs/events","assignees_url":"https://api.github.com/repos/mrGhosd/travelerjs/assignees{/user}","branches_url":"https://api.github.com/repos/mrGhosd/travelerjs/branches{/branch}","tags_url":"https://api.github.com/repos/mrGhosd/travelerjs/tags","blobs_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrGhosd/travelerjs/statuses/{sha}","languages_url":"https://api.github.com/repos/mrGhosd/travelerjs/languages","stargazers_url":"https://api.github.com/repos/mrGhosd/travelerjs/stargazers","contributors_url":"https://api.github.com/repos/mrGhosd/travelerjs/contributors","subscribers_url":"https://api.github.com/repos/mrGhosd/travelerjs/subscribers","subscription_url":"https://api.github.com/repos/mrGhosd/travelerjs/subscription","commits_url":"https://api.github.com/repos/mrGhosd/travelerjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrGhosd/travelerjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrGhosd/travelerjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrGhosd/travelerjs/contents/{+path}","compare_url":"https://api.github.com/repos/mrGhosd/travelerjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrGhosd/travelerjs/merges","archive_url":"https://api.github.com/repos/mrGhosd/travelerjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrGhosd/travelerjs/downloads","issues_url":"https://api.github.com/repos/mrGhosd/travelerjs/issues{/number}","pulls_url":"https://api.github.com/repos/mrGhosd/travelerjs/pulls{/number}","milestones_url":"https://api.github.com/repos/mrGhosd/travelerjs/milestones{/number}","notifications_url":"https://api.github.com/repos/mrGhosd/travelerjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrGhosd/travelerjs/labels{/name}","releases_url":"https://api.github.com/repos/mrGhosd/travelerjs/releases{/id}","created_at":"2015-10-17T12:42:06Z","updated_at":"2015-10-26T17:33:00Z","pushed_at":"2015-11-06T18:47:50Z","git_url":"git://github.com/mrGhosd/travelerjs.git","ssh_url":"git@github.com:mrGhosd/travelerjs.git","clone_url":"https://github.com/mrGhosd/travelerjs.git","svn_url":"https://github.com/mrGhosd/travelerjs","homepage":null,"size":10284,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4"},"html":{"href":"https://github.com/mrGhosd/travelerjs/pull/4"},"issue":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/issues/4"},"comments":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/mrGhosd/travelerjs/statuses/00da699821b651cb0d2589a67ece8aecfca210e8"}}}}