{"action":"created","comment":{"url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/comments/48158101","id":48158101,"diff_hunk":"@@ -253,7 +253,11 @@ public function actionFavorite($id)\n             throw new BadRequestHttpException();\n         }\n \n-        return $result;\n+        if (Yii::$app->request->isAjax) {\n+            return $result;\n+        } else {","path":"frontend/controllers/QaController.php","position":7,"original_position":7,"commit_id":"bc14d8dfaeafd2c0f586d4c9f60b96e6b5517826","original_commit_id":"bc14d8dfaeafd2c0f586d4c9f60b96e6b5517826","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"body":"я понял, просто без него код чище смотрится.\r\n\r\n```\r\nif (Yii::$app->request->isAjax) {\r\n      return $result;\r\n}\r\nreturn $this->redirect('index');\r\n```","created_at":"2015-12-21T15:51:20Z","updated_at":"2015-12-21T15:51:20Z","html_url":"https://github.com/samdark/yiiframework-ru/pull/38#discussion_r48158101","pull_request_url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/comments/48158101"},"html":{"href":"https://github.com/samdark/yiiframework-ru/pull/38#discussion_r48158101"},"pull_request":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38","id":54257518,"html_url":"https://github.com/samdark/yiiframework-ru/pull/38","diff_url":"https://github.com/samdark/yiiframework-ru/pull/38.diff","patch_url":"https://github.com/samdark/yiiframework-ru/pull/38.patch","issue_url":"https://api.github.com/repos/samdark/yiiframework-ru/issues/38","number":38,"state":"open","locked":false,"title":"#37 JS for QA favorites ","user":{"login":"CNeverDie","id":7982859,"avatar_url":"https://avatars.githubusercontent.com/u/7982859?v=3","gravatar_id":"","url":"https://api.github.com/users/CNeverDie","html_url":"https://github.com/CNeverDie","followers_url":"https://api.github.com/users/CNeverDie/followers","following_url":"https://api.github.com/users/CNeverDie/following{/other_user}","gists_url":"https://api.github.com/users/CNeverDie/gists{/gist_id}","starred_url":"https://api.github.com/users/CNeverDie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CNeverDie/subscriptions","organizations_url":"https://api.github.com/users/CNeverDie/orgs","repos_url":"https://api.github.com/users/CNeverDie/repos","events_url":"https://api.github.com/users/CNeverDie/events{/privacy}","received_events_url":"https://api.github.com/users/CNeverDie/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-21T13:43:52Z","updated_at":"2015-12-21T15:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a860e39d4bed9de2e0f52a99ef8d867912b7480d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38/commits","review_comments_url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38/comments","review_comment_url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samdark/yiiframework-ru/issues/38/comments","statuses_url":"https://api.github.com/repos/samdark/yiiframework-ru/statuses/bc14d8dfaeafd2c0f586d4c9f60b96e6b5517826","head":{"label":"CNeverDie:ajax-favorite-add","ref":"ajax-favorite-add","sha":"bc14d8dfaeafd2c0f586d4c9f60b96e6b5517826","user":{"login":"CNeverDie","id":7982859,"avatar_url":"https://avatars.githubusercontent.com/u/7982859?v=3","gravatar_id":"","url":"https://api.github.com/users/CNeverDie","html_url":"https://github.com/CNeverDie","followers_url":"https://api.github.com/users/CNeverDie/followers","following_url":"https://api.github.com/users/CNeverDie/following{/other_user}","gists_url":"https://api.github.com/users/CNeverDie/gists{/gist_id}","starred_url":"https://api.github.com/users/CNeverDie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CNeverDie/subscriptions","organizations_url":"https://api.github.com/users/CNeverDie/orgs","repos_url":"https://api.github.com/users/CNeverDie/repos","events_url":"https://api.github.com/users/CNeverDie/events{/privacy}","received_events_url":"https://api.github.com/users/CNeverDie/received_events","type":"User","site_admin":false},"repo":{"id":47642805,"name":"yiiframework-ru","full_name":"CNeverDie/yiiframework-ru","owner":{"login":"CNeverDie","id":7982859,"avatar_url":"https://avatars.githubusercontent.com/u/7982859?v=3","gravatar_id":"","url":"https://api.github.com/users/CNeverDie","html_url":"https://github.com/CNeverDie","followers_url":"https://api.github.com/users/CNeverDie/followers","following_url":"https://api.github.com/users/CNeverDie/following{/other_user}","gists_url":"https://api.github.com/users/CNeverDie/gists{/gist_id}","starred_url":"https://api.github.com/users/CNeverDie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CNeverDie/subscriptions","organizations_url":"https://api.github.com/users/CNeverDie/orgs","repos_url":"https://api.github.com/users/CNeverDie/repos","events_url":"https://api.github.com/users/CNeverDie/events{/privacy}","received_events_url":"https://api.github.com/users/CNeverDie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CNeverDie/yiiframework-ru","description":"yiiframework.ru","fork":true,"url":"https://api.github.com/repos/CNeverDie/yiiframework-ru","forks_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/forks","keys_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/teams","hooks_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/hooks","issue_events_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/issues/events{/number}","events_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/events","assignees_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/assignees{/user}","branches_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/branches{/branch}","tags_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/tags","blobs_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/git/refs{/sha}","trees_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/statuses/{sha}","languages_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/languages","stargazers_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/stargazers","contributors_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/contributors","subscribers_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/subscribers","subscription_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/subscription","commits_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/commits{/sha}","git_commits_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/git/commits{/sha}","comments_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/comments{/number}","issue_comment_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/issues/comments{/number}","contents_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/contents/{+path}","compare_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/merges","archive_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/downloads","issues_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/issues{/number}","pulls_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/pulls{/number}","milestones_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/milestones{/number}","notifications_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/labels{/name}","releases_url":"https://api.github.com/repos/CNeverDie/yiiframework-ru/releases{/id}","created_at":"2015-12-08T18:58:55Z","updated_at":"2015-12-08T18:58:55Z","pushed_at":"2015-12-21T13:55:24Z","git_url":"git://github.com/CNeverDie/yiiframework-ru.git","ssh_url":"git@github.com:CNeverDie/yiiframework-ru.git","clone_url":"https://github.com/CNeverDie/yiiframework-ru.git","svn_url":"https://github.com/CNeverDie/yiiframework-ru","homepage":"https://gitter.im/samdark/yiiframework-ru","size":2104,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"samdark:development","ref":"development","sha":"6877c121f88f00a27be8d86b2e3a34782aa5ea66","user":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"repo":{"id":21160515,"name":"yiiframework-ru","full_name":"samdark/yiiframework-ru","owner":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samdark/yiiframework-ru","description":"yiiframework.ru","fork":false,"url":"https://api.github.com/repos/samdark/yiiframework-ru","forks_url":"https://api.github.com/repos/samdark/yiiframework-ru/forks","keys_url":"https://api.github.com/repos/samdark/yiiframework-ru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samdark/yiiframework-ru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samdark/yiiframework-ru/teams","hooks_url":"https://api.github.com/repos/samdark/yiiframework-ru/hooks","issue_events_url":"https://api.github.com/repos/samdark/yiiframework-ru/issues/events{/number}","events_url":"https://api.github.com/repos/samdark/yiiframework-ru/events","assignees_url":"https://api.github.com/repos/samdark/yiiframework-ru/assignees{/user}","branches_url":"https://api.github.com/repos/samdark/yiiframework-ru/branches{/branch}","tags_url":"https://api.github.com/repos/samdark/yiiframework-ru/tags","blobs_url":"https://api.github.com/repos/samdark/yiiframework-ru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samdark/yiiframework-ru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samdark/yiiframework-ru/git/refs{/sha}","trees_url":"https://api.github.com/repos/samdark/yiiframework-ru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samdark/yiiframework-ru/statuses/{sha}","languages_url":"https://api.github.com/repos/samdark/yiiframework-ru/languages","stargazers_url":"https://api.github.com/repos/samdark/yiiframework-ru/stargazers","contributors_url":"https://api.github.com/repos/samdark/yiiframework-ru/contributors","subscribers_url":"https://api.github.com/repos/samdark/yiiframework-ru/subscribers","subscription_url":"https://api.github.com/repos/samdark/yiiframework-ru/subscription","commits_url":"https://api.github.com/repos/samdark/yiiframework-ru/commits{/sha}","git_commits_url":"https://api.github.com/repos/samdark/yiiframework-ru/git/commits{/sha}","comments_url":"https://api.github.com/repos/samdark/yiiframework-ru/comments{/number}","issue_comment_url":"https://api.github.com/repos/samdark/yiiframework-ru/issues/comments{/number}","contents_url":"https://api.github.com/repos/samdark/yiiframework-ru/contents/{+path}","compare_url":"https://api.github.com/repos/samdark/yiiframework-ru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samdark/yiiframework-ru/merges","archive_url":"https://api.github.com/repos/samdark/yiiframework-ru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samdark/yiiframework-ru/downloads","issues_url":"https://api.github.com/repos/samdark/yiiframework-ru/issues{/number}","pulls_url":"https://api.github.com/repos/samdark/yiiframework-ru/pulls{/number}","milestones_url":"https://api.github.com/repos/samdark/yiiframework-ru/milestones{/number}","notifications_url":"https://api.github.com/repos/samdark/yiiframework-ru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samdark/yiiframework-ru/labels{/name}","releases_url":"https://api.github.com/repos/samdark/yiiframework-ru/releases{/id}","created_at":"2014-06-24T10:16:53Z","updated_at":"2015-12-20T13:39:31Z","pushed_at":"2015-12-21T13:55:24Z","git_url":"git://github.com/samdark/yiiframework-ru.git","ssh_url":"git@github.com:samdark/yiiframework-ru.git","clone_url":"https://github.com/samdark/yiiframework-ru.git","svn_url":"https://github.com/samdark/yiiframework-ru","homepage":"https://gitter.im/samdark/yiiframework-ru","size":2114,"stargazers_count":18,"watchers_count":18,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":10,"forks":13,"open_issues":10,"watchers":18,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38"},"html":{"href":"https://github.com/samdark/yiiframework-ru/pull/38"},"issue":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/issues/38"},"comments":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/samdark/yiiframework-ru/statuses/bc14d8dfaeafd2c0f586d4c9f60b96e6b5517826"}}}}