{"action":"created","comment":{"url":"https://api.github.com/repos/saltukhova/qna/pulls/comments/53142580","id":53142580,"diff_hunk":"@@ -0,0 +1,7 @@\n+.subscription\n+  - if can? :subscribe, question\n+    = link_to 'Подписаться', subscribe_question_path(question), method: :patch, remote: true, class: 'subscribe-link'\n+  - if (can? :unsubscribe, question) && current_user.subscribed?(question)","path":"app/views/questions/_subscription.html.slim","position":4,"original_position":4,"commit_id":"0823a9de5aadccd96d7be52ed8840af4cad86875","original_commit_id":"0823a9de5aadccd96d7be52ed8840af4cad86875","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"Собственно факт того, что юзер подписан на вопрос и должно давать ему право на отписку, то есть current_user.subscribed?(question) должно проверяться в Ability","created_at":"2016-02-17T10:01:45Z","updated_at":"2016-02-17T10:01:45Z","html_url":"https://github.com/saltukhova/qna/pull/15#discussion_r53142580","pull_request_url":"https://api.github.com/repos/saltukhova/qna/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/comments/53142580"},"html":{"href":"https://github.com/saltukhova/qna/pull/15#discussion_r53142580"},"pull_request":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/saltukhova/qna/pulls/15","id":59565589,"html_url":"https://github.com/saltukhova/qna/pull/15","diff_url":"https://github.com/saltukhova/qna/pull/15.diff","patch_url":"https://github.com/saltukhova/qna/pull/15.patch","issue_url":"https://api.github.com/repos/saltukhova/qna/issues/15","number":15,"state":"open","locked":false,"title":"Lesson17","user":{"login":"saltukhova","id":15727440,"avatar_url":"https://avatars.githubusercontent.com/u/15727440?v=3","gravatar_id":"","url":"https://api.github.com/users/saltukhova","html_url":"https://github.com/saltukhova","followers_url":"https://api.github.com/users/saltukhova/followers","following_url":"https://api.github.com/users/saltukhova/following{/other_user}","gists_url":"https://api.github.com/users/saltukhova/gists{/gist_id}","starred_url":"https://api.github.com/users/saltukhova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltukhova/subscriptions","organizations_url":"https://api.github.com/users/saltukhova/orgs","repos_url":"https://api.github.com/users/saltukhova/repos","events_url":"https://api.github.com/users/saltukhova/events{/privacy}","received_events_url":"https://api.github.com/users/saltukhova/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-16T22:31:28Z","updated_at":"2016-02-17T10:01:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e94f9799dfa4611eb7cbb5249f189ca9ee30efa3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/saltukhova/qna/pulls/15/commits","review_comments_url":"https://api.github.com/repos/saltukhova/qna/pulls/15/comments","review_comment_url":"https://api.github.com/repos/saltukhova/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltukhova/qna/issues/15/comments","statuses_url":"https://api.github.com/repos/saltukhova/qna/statuses/0823a9de5aadccd96d7be52ed8840af4cad86875","head":{"label":"saltukhova:Lesson17","ref":"Lesson17","sha":"0823a9de5aadccd96d7be52ed8840af4cad86875","user":{"login":"saltukhova","id":15727440,"avatar_url":"https://avatars.githubusercontent.com/u/15727440?v=3","gravatar_id":"","url":"https://api.github.com/users/saltukhova","html_url":"https://github.com/saltukhova","followers_url":"https://api.github.com/users/saltukhova/followers","following_url":"https://api.github.com/users/saltukhova/following{/other_user}","gists_url":"https://api.github.com/users/saltukhova/gists{/gist_id}","starred_url":"https://api.github.com/users/saltukhova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltukhova/subscriptions","organizations_url":"https://api.github.com/users/saltukhova/orgs","repos_url":"https://api.github.com/users/saltukhova/repos","events_url":"https://api.github.com/users/saltukhova/events{/privacy}","received_events_url":"https://api.github.com/users/saltukhova/received_events","type":"User","site_admin":false},"repo":{"id":45839939,"name":"qna","full_name":"saltukhova/qna","owner":{"login":"saltukhova","id":15727440,"avatar_url":"https://avatars.githubusercontent.com/u/15727440?v=3","gravatar_id":"","url":"https://api.github.com/users/saltukhova","html_url":"https://github.com/saltukhova","followers_url":"https://api.github.com/users/saltukhova/followers","following_url":"https://api.github.com/users/saltukhova/following{/other_user}","gists_url":"https://api.github.com/users/saltukhova/gists{/gist_id}","starred_url":"https://api.github.com/users/saltukhova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltukhova/subscriptions","organizations_url":"https://api.github.com/users/saltukhova/orgs","repos_url":"https://api.github.com/users/saltukhova/repos","events_url":"https://api.github.com/users/saltukhova/events{/privacy}","received_events_url":"https://api.github.com/users/saltukhova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saltukhova/qna","description":"","fork":false,"url":"https://api.github.com/repos/saltukhova/qna","forks_url":"https://api.github.com/repos/saltukhova/qna/forks","keys_url":"https://api.github.com/repos/saltukhova/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltukhova/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltukhova/qna/teams","hooks_url":"https://api.github.com/repos/saltukhova/qna/hooks","issue_events_url":"https://api.github.com/repos/saltukhova/qna/issues/events{/number}","events_url":"https://api.github.com/repos/saltukhova/qna/events","assignees_url":"https://api.github.com/repos/saltukhova/qna/assignees{/user}","branches_url":"https://api.github.com/repos/saltukhova/qna/branches{/branch}","tags_url":"https://api.github.com/repos/saltukhova/qna/tags","blobs_url":"https://api.github.com/repos/saltukhova/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltukhova/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltukhova/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltukhova/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltukhova/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/saltukhova/qna/languages","stargazers_url":"https://api.github.com/repos/saltukhova/qna/stargazers","contributors_url":"https://api.github.com/repos/saltukhova/qna/contributors","subscribers_url":"https://api.github.com/repos/saltukhova/qna/subscribers","subscription_url":"https://api.github.com/repos/saltukhova/qna/subscription","commits_url":"https://api.github.com/repos/saltukhova/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltukhova/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltukhova/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltukhova/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltukhova/qna/contents/{+path}","compare_url":"https://api.github.com/repos/saltukhova/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltukhova/qna/merges","archive_url":"https://api.github.com/repos/saltukhova/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltukhova/qna/downloads","issues_url":"https://api.github.com/repos/saltukhova/qna/issues{/number}","pulls_url":"https://api.github.com/repos/saltukhova/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/saltukhova/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/saltukhova/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltukhova/qna/labels{/name}","releases_url":"https://api.github.com/repos/saltukhova/qna/releases{/id}","deployments_url":"https://api.github.com/repos/saltukhova/qna/deployments","created_at":"2015-11-09T13:35:55Z","updated_at":"2016-01-25T10:47:43Z","pushed_at":"2016-02-16T22:31:29Z","git_url":"git://github.com/saltukhova/qna.git","ssh_url":"git@github.com:saltukhova/qna.git","clone_url":"https://github.com/saltukhova/qna.git","svn_url":"https://github.com/saltukhova/qna","homepage":null,"size":221,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"saltukhova:master","ref":"master","sha":"d704ea94f15f8aac4c61d019cf572f893f336e31","user":{"login":"saltukhova","id":15727440,"avatar_url":"https://avatars.githubusercontent.com/u/15727440?v=3","gravatar_id":"","url":"https://api.github.com/users/saltukhova","html_url":"https://github.com/saltukhova","followers_url":"https://api.github.com/users/saltukhova/followers","following_url":"https://api.github.com/users/saltukhova/following{/other_user}","gists_url":"https://api.github.com/users/saltukhova/gists{/gist_id}","starred_url":"https://api.github.com/users/saltukhova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltukhova/subscriptions","organizations_url":"https://api.github.com/users/saltukhova/orgs","repos_url":"https://api.github.com/users/saltukhova/repos","events_url":"https://api.github.com/users/saltukhova/events{/privacy}","received_events_url":"https://api.github.com/users/saltukhova/received_events","type":"User","site_admin":false},"repo":{"id":45839939,"name":"qna","full_name":"saltukhova/qna","owner":{"login":"saltukhova","id":15727440,"avatar_url":"https://avatars.githubusercontent.com/u/15727440?v=3","gravatar_id":"","url":"https://api.github.com/users/saltukhova","html_url":"https://github.com/saltukhova","followers_url":"https://api.github.com/users/saltukhova/followers","following_url":"https://api.github.com/users/saltukhova/following{/other_user}","gists_url":"https://api.github.com/users/saltukhova/gists{/gist_id}","starred_url":"https://api.github.com/users/saltukhova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltukhova/subscriptions","organizations_url":"https://api.github.com/users/saltukhova/orgs","repos_url":"https://api.github.com/users/saltukhova/repos","events_url":"https://api.github.com/users/saltukhova/events{/privacy}","received_events_url":"https://api.github.com/users/saltukhova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saltukhova/qna","description":"","fork":false,"url":"https://api.github.com/repos/saltukhova/qna","forks_url":"https://api.github.com/repos/saltukhova/qna/forks","keys_url":"https://api.github.com/repos/saltukhova/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltukhova/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltukhova/qna/teams","hooks_url":"https://api.github.com/repos/saltukhova/qna/hooks","issue_events_url":"https://api.github.com/repos/saltukhova/qna/issues/events{/number}","events_url":"https://api.github.com/repos/saltukhova/qna/events","assignees_url":"https://api.github.com/repos/saltukhova/qna/assignees{/user}","branches_url":"https://api.github.com/repos/saltukhova/qna/branches{/branch}","tags_url":"https://api.github.com/repos/saltukhova/qna/tags","blobs_url":"https://api.github.com/repos/saltukhova/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltukhova/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltukhova/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltukhova/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltukhova/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/saltukhova/qna/languages","stargazers_url":"https://api.github.com/repos/saltukhova/qna/stargazers","contributors_url":"https://api.github.com/repos/saltukhova/qna/contributors","subscribers_url":"https://api.github.com/repos/saltukhova/qna/subscribers","subscription_url":"https://api.github.com/repos/saltukhova/qna/subscription","commits_url":"https://api.github.com/repos/saltukhova/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltukhova/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltukhova/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltukhova/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltukhova/qna/contents/{+path}","compare_url":"https://api.github.com/repos/saltukhova/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltukhova/qna/merges","archive_url":"https://api.github.com/repos/saltukhova/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltukhova/qna/downloads","issues_url":"https://api.github.com/repos/saltukhova/qna/issues{/number}","pulls_url":"https://api.github.com/repos/saltukhova/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/saltukhova/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/saltukhova/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltukhova/qna/labels{/name}","releases_url":"https://api.github.com/repos/saltukhova/qna/releases{/id}","deployments_url":"https://api.github.com/repos/saltukhova/qna/deployments","created_at":"2015-11-09T13:35:55Z","updated_at":"2016-01-25T10:47:43Z","pushed_at":"2016-02-16T22:31:29Z","git_url":"git://github.com/saltukhova/qna.git","ssh_url":"git@github.com:saltukhova/qna.git","clone_url":"https://github.com/saltukhova/qna.git","svn_url":"https://github.com/saltukhova/qna","homepage":null,"size":221,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/15"},"html":{"href":"https://github.com/saltukhova/qna/pull/15"},"issue":{"href":"https://api.github.com/repos/saltukhova/qna/issues/15"},"comments":{"href":"https://api.github.com/repos/saltukhova/qna/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltukhova/qna/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/saltukhova/qna/statuses/0823a9de5aadccd96d7be52ed8840af4cad86875"}}}}