{"action":"created","comment":{"url":"https://api.github.com/repos/Navarrskij/stack/pulls/comments/87349314","pull_request_review_id":7963947,"id":87349314,"diff_hunk":"@@ -0,0 +1,35 @@\n+module Voted\n+  extend ActiveSupport::Concern\n+\n+  included do\n+    before_action :set_votable, only: [:vote_up, :vote_down]\n+  end\n+\n+  def vote_up\n+    success, error = @votable.vote_up(current_user)","path":"app/controllers/concerns/voted.rb","position":9,"original_position":9,"commit_id":"4ac62dcd1d91beafffe16d3c3b0930bfb09c7648","original_commit_id":"4ac62dcd1d91beafffe16d3c3b0930bfb09c7648","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":"Не нравится мне эта идея с возвратом 2-х значений, не первый раз уже ее вижу. Почему бы не возвращать true/false, например, как это с save происходит? А ошибку (она одна всего) разруливать на уровне контроллера?","created_at":"2016-11-10T08:42:54Z","updated_at":"2016-11-10T08:53:47Z","html_url":"https://github.com/Navarrskij/stack/pull/22#discussion_r87349314","pull_request_url":"https://api.github.com/repos/Navarrskij/stack/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/comments/87349314"},"html":{"href":"https://github.com/Navarrskij/stack/pull/22#discussion_r87349314"},"pull_request":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/Navarrskij/stack/pulls/22","id":93061018,"html_url":"https://github.com/Navarrskij/stack/pull/22","diff_url":"https://github.com/Navarrskij/stack/pull/22.diff","patch_url":"https://github.com/Navarrskij/stack/pull/22.patch","issue_url":"https://api.github.com/repos/Navarrskij/stack/issues/22","number":22,"state":"open","locked":false,"title":"Vote","user":{"login":"Navarrskij","id":21157957,"avatar_url":"https://avatars.githubusercontent.com/u/21157957?v=3","gravatar_id":"","url":"https://api.github.com/users/Navarrskij","html_url":"https://github.com/Navarrskij","followers_url":"https://api.github.com/users/Navarrskij/followers","following_url":"https://api.github.com/users/Navarrskij/following{/other_user}","gists_url":"https://api.github.com/users/Navarrskij/gists{/gist_id}","starred_url":"https://api.github.com/users/Navarrskij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Navarrskij/subscriptions","organizations_url":"https://api.github.com/users/Navarrskij/orgs","repos_url":"https://api.github.com/users/Navarrskij/repos","events_url":"https://api.github.com/users/Navarrskij/events{/privacy}","received_events_url":"https://api.github.com/users/Navarrskij/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-09T23:45:26Z","updated_at":"2016-11-10T08:53:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d1017eab6ac532d7f99237b8d37a7862d70c1d5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Navarrskij/stack/pulls/22/commits","review_comments_url":"https://api.github.com/repos/Navarrskij/stack/pulls/22/comments","review_comment_url":"https://api.github.com/repos/Navarrskij/stack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Navarrskij/stack/issues/22/comments","statuses_url":"https://api.github.com/repos/Navarrskij/stack/statuses/4ac62dcd1d91beafffe16d3c3b0930bfb09c7648","head":{"label":"Navarrskij:vote","ref":"vote","sha":"4ac62dcd1d91beafffe16d3c3b0930bfb09c7648","user":{"login":"Navarrskij","id":21157957,"avatar_url":"https://avatars.githubusercontent.com/u/21157957?v=3","gravatar_id":"","url":"https://api.github.com/users/Navarrskij","html_url":"https://github.com/Navarrskij","followers_url":"https://api.github.com/users/Navarrskij/followers","following_url":"https://api.github.com/users/Navarrskij/following{/other_user}","gists_url":"https://api.github.com/users/Navarrskij/gists{/gist_id}","starred_url":"https://api.github.com/users/Navarrskij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Navarrskij/subscriptions","organizations_url":"https://api.github.com/users/Navarrskij/orgs","repos_url":"https://api.github.com/users/Navarrskij/repos","events_url":"https://api.github.com/users/Navarrskij/events{/privacy}","received_events_url":"https://api.github.com/users/Navarrskij/received_events","type":"User","site_admin":false},"repo":{"id":70529002,"name":"stack","full_name":"Navarrskij/stack","owner":{"login":"Navarrskij","id":21157957,"avatar_url":"https://avatars.githubusercontent.com/u/21157957?v=3","gravatar_id":"","url":"https://api.github.com/users/Navarrskij","html_url":"https://github.com/Navarrskij","followers_url":"https://api.github.com/users/Navarrskij/followers","following_url":"https://api.github.com/users/Navarrskij/following{/other_user}","gists_url":"https://api.github.com/users/Navarrskij/gists{/gist_id}","starred_url":"https://api.github.com/users/Navarrskij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Navarrskij/subscriptions","organizations_url":"https://api.github.com/users/Navarrskij/orgs","repos_url":"https://api.github.com/users/Navarrskij/repos","events_url":"https://api.github.com/users/Navarrskij/events{/privacy}","received_events_url":"https://api.github.com/users/Navarrskij/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Navarrskij/stack","description":null,"fork":false,"url":"https://api.github.com/repos/Navarrskij/stack","forks_url":"https://api.github.com/repos/Navarrskij/stack/forks","keys_url":"https://api.github.com/repos/Navarrskij/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Navarrskij/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Navarrskij/stack/teams","hooks_url":"https://api.github.com/repos/Navarrskij/stack/hooks","issue_events_url":"https://api.github.com/repos/Navarrskij/stack/issues/events{/number}","events_url":"https://api.github.com/repos/Navarrskij/stack/events","assignees_url":"https://api.github.com/repos/Navarrskij/stack/assignees{/user}","branches_url":"https://api.github.com/repos/Navarrskij/stack/branches{/branch}","tags_url":"https://api.github.com/repos/Navarrskij/stack/tags","blobs_url":"https://api.github.com/repos/Navarrskij/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Navarrskij/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Navarrskij/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Navarrskij/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Navarrskij/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/Navarrskij/stack/languages","stargazers_url":"https://api.github.com/repos/Navarrskij/stack/stargazers","contributors_url":"https://api.github.com/repos/Navarrskij/stack/contributors","subscribers_url":"https://api.github.com/repos/Navarrskij/stack/subscribers","subscription_url":"https://api.github.com/repos/Navarrskij/stack/subscription","commits_url":"https://api.github.com/repos/Navarrskij/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Navarrskij/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Navarrskij/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Navarrskij/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Navarrskij/stack/contents/{+path}","compare_url":"https://api.github.com/repos/Navarrskij/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Navarrskij/stack/merges","archive_url":"https://api.github.com/repos/Navarrskij/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Navarrskij/stack/downloads","issues_url":"https://api.github.com/repos/Navarrskij/stack/issues{/number}","pulls_url":"https://api.github.com/repos/Navarrskij/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/Navarrskij/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/Navarrskij/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Navarrskij/stack/labels{/name}","releases_url":"https://api.github.com/repos/Navarrskij/stack/releases{/id}","deployments_url":"https://api.github.com/repos/Navarrskij/stack/deployments","created_at":"2016-10-10T21:09:08Z","updated_at":"2016-10-10T21:10:46Z","pushed_at":"2016-11-09T23:45:26Z","git_url":"git://github.com/Navarrskij/stack.git","ssh_url":"git@github.com:Navarrskij/stack.git","clone_url":"https://github.com/Navarrskij/stack.git","svn_url":"https://github.com/Navarrskij/stack","homepage":null,"size":150,"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":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"Navarrskij:master","ref":"master","sha":"61f79977d060840ce4a57583e857b7c812eaef57","user":{"login":"Navarrskij","id":21157957,"avatar_url":"https://avatars.githubusercontent.com/u/21157957?v=3","gravatar_id":"","url":"https://api.github.com/users/Navarrskij","html_url":"https://github.com/Navarrskij","followers_url":"https://api.github.com/users/Navarrskij/followers","following_url":"https://api.github.com/users/Navarrskij/following{/other_user}","gists_url":"https://api.github.com/users/Navarrskij/gists{/gist_id}","starred_url":"https://api.github.com/users/Navarrskij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Navarrskij/subscriptions","organizations_url":"https://api.github.com/users/Navarrskij/orgs","repos_url":"https://api.github.com/users/Navarrskij/repos","events_url":"https://api.github.com/users/Navarrskij/events{/privacy}","received_events_url":"https://api.github.com/users/Navarrskij/received_events","type":"User","site_admin":false},"repo":{"id":70529002,"name":"stack","full_name":"Navarrskij/stack","owner":{"login":"Navarrskij","id":21157957,"avatar_url":"https://avatars.githubusercontent.com/u/21157957?v=3","gravatar_id":"","url":"https://api.github.com/users/Navarrskij","html_url":"https://github.com/Navarrskij","followers_url":"https://api.github.com/users/Navarrskij/followers","following_url":"https://api.github.com/users/Navarrskij/following{/other_user}","gists_url":"https://api.github.com/users/Navarrskij/gists{/gist_id}","starred_url":"https://api.github.com/users/Navarrskij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Navarrskij/subscriptions","organizations_url":"https://api.github.com/users/Navarrskij/orgs","repos_url":"https://api.github.com/users/Navarrskij/repos","events_url":"https://api.github.com/users/Navarrskij/events{/privacy}","received_events_url":"https://api.github.com/users/Navarrskij/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Navarrskij/stack","description":null,"fork":false,"url":"https://api.github.com/repos/Navarrskij/stack","forks_url":"https://api.github.com/repos/Navarrskij/stack/forks","keys_url":"https://api.github.com/repos/Navarrskij/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Navarrskij/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Navarrskij/stack/teams","hooks_url":"https://api.github.com/repos/Navarrskij/stack/hooks","issue_events_url":"https://api.github.com/repos/Navarrskij/stack/issues/events{/number}","events_url":"https://api.github.com/repos/Navarrskij/stack/events","assignees_url":"https://api.github.com/repos/Navarrskij/stack/assignees{/user}","branches_url":"https://api.github.com/repos/Navarrskij/stack/branches{/branch}","tags_url":"https://api.github.com/repos/Navarrskij/stack/tags","blobs_url":"https://api.github.com/repos/Navarrskij/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Navarrskij/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Navarrskij/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Navarrskij/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Navarrskij/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/Navarrskij/stack/languages","stargazers_url":"https://api.github.com/repos/Navarrskij/stack/stargazers","contributors_url":"https://api.github.com/repos/Navarrskij/stack/contributors","subscribers_url":"https://api.github.com/repos/Navarrskij/stack/subscribers","subscription_url":"https://api.github.com/repos/Navarrskij/stack/subscription","commits_url":"https://api.github.com/repos/Navarrskij/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Navarrskij/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Navarrskij/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Navarrskij/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Navarrskij/stack/contents/{+path}","compare_url":"https://api.github.com/repos/Navarrskij/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Navarrskij/stack/merges","archive_url":"https://api.github.com/repos/Navarrskij/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Navarrskij/stack/downloads","issues_url":"https://api.github.com/repos/Navarrskij/stack/issues{/number}","pulls_url":"https://api.github.com/repos/Navarrskij/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/Navarrskij/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/Navarrskij/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Navarrskij/stack/labels{/name}","releases_url":"https://api.github.com/repos/Navarrskij/stack/releases{/id}","deployments_url":"https://api.github.com/repos/Navarrskij/stack/deployments","created_at":"2016-10-10T21:09:08Z","updated_at":"2016-10-10T21:10:46Z","pushed_at":"2016-11-09T23:45:26Z","git_url":"git://github.com/Navarrskij/stack.git","ssh_url":"git@github.com:Navarrskij/stack.git","clone_url":"https://github.com/Navarrskij/stack.git","svn_url":"https://github.com/Navarrskij/stack","homepage":null,"size":150,"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":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/22"},"html":{"href":"https://github.com/Navarrskij/stack/pull/22"},"issue":{"href":"https://api.github.com/repos/Navarrskij/stack/issues/22"},"comments":{"href":"https://api.github.com/repos/Navarrskij/stack/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Navarrskij/stack/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/Navarrskij/stack/statuses/4ac62dcd1d91beafffe16d3c3b0930bfb09c7648"}}}}
{"actor":{"display_login":"vkurennov"}}