{"action":"created","comment":{"url":"https://api.github.com/repos/yorikim/so/pulls/comments/45628334","id":45628334,"diff_hunk":"@@ -3,7 +3,37 @@ $ ->\n     e.preventDefault();\n     $('#edit_question_' + $(this).data('questionId')).show();\n \n+  $('.add-question-comment-link').click (e) ->\n+    e.preventDefault();\n+    $('.question-container #new_comment').show();\n+\n   $('.question-container .vote-up, .question-container .vote-down').bind 'ajax:success', (e, data) ->\n     $('.question-container .vote-value').text(data.vote_value)\n     $('.question-container .vote-up').toggleClass('active', data.vote_status is 1)\n-    $('.question-container .vote-down').toggleClass('active', data.vote_status is -1)\n\\ No newline at end of file\n+    $('.question-container .vote-down').toggleClass('active', data.vote_status is -1)\n+\n+  PrivatePub.subscribe \"/questions/new\", (data, channel) ->\n+    console.log(data.question)\n+\n+    question = $.parseJSON(data.question);\n+    wrapper = Mustache.render('\\\n+        <div class=\"question-summary row\">","path":"app/assets/javascripts/questions.coffee","position":20,"original_position":20,"commit_id":"07e3dfe96ed5764401bb2c12a9446f68655560b1","original_commit_id":"bfe4bad7c86edfaba732a6134667d69b443d0e20","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"body":"Не нашел быстрый и легкий способ отделить шаблон в отдельный файл.\r\nПо сути, я здесь использовал mustache только как sprintf.","created_at":"2015-11-23T16:55:32Z","updated_at":"2015-11-23T16:55:32Z","html_url":"https://github.com/yorikim/so/pull/8#discussion_r45628334","pull_request_url":"https://api.github.com/repos/yorikim/so/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/yorikim/so/pulls/comments/45628334"},"html":{"href":"https://github.com/yorikim/so/pull/8#discussion_r45628334"},"pull_request":{"href":"https://api.github.com/repos/yorikim/so/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/yorikim/so/pulls/8","id":51518802,"html_url":"https://github.com/yorikim/so/pull/8","diff_url":"https://github.com/yorikim/so/pull/8.diff","patch_url":"https://github.com/yorikim/so/pull/8.patch","issue_url":"https://api.github.com/repos/yorikim/so/issues/8","number":8,"state":"open","locked":false,"title":"add features with PrivatePub:","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"body":"1. show created question to all users, which opened question list\r\n2. show created answer to all users, which opened the parent question\r\n3. user can comment question and answer\r\n4. show created comment to all users, which opened the parent question","created_at":"2015-11-23T12:46:35Z","updated_at":"2015-11-23T16:55:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b79ac04355d3f48366ffb542c864c2a5df9d5f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yorikim/so/pulls/8/commits","review_comments_url":"https://api.github.com/repos/yorikim/so/pulls/8/comments","review_comment_url":"https://api.github.com/repos/yorikim/so/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yorikim/so/issues/8/comments","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/07e3dfe96ed5764401bb2c12a9446f68655560b1","head":{"label":"yorikim:lesson10","ref":"lesson10","sha":"07e3dfe96ed5764401bb2c12a9446f68655560b1","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"repo":{"id":45777196,"name":"so","full_name":"yorikim/so","owner":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yorikim/so","description":"simple stack overflow","fork":false,"url":"https://api.github.com/repos/yorikim/so","forks_url":"https://api.github.com/repos/yorikim/so/forks","keys_url":"https://api.github.com/repos/yorikim/so/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yorikim/so/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yorikim/so/teams","hooks_url":"https://api.github.com/repos/yorikim/so/hooks","issue_events_url":"https://api.github.com/repos/yorikim/so/issues/events{/number}","events_url":"https://api.github.com/repos/yorikim/so/events","assignees_url":"https://api.github.com/repos/yorikim/so/assignees{/user}","branches_url":"https://api.github.com/repos/yorikim/so/branches{/branch}","tags_url":"https://api.github.com/repos/yorikim/so/tags","blobs_url":"https://api.github.com/repos/yorikim/so/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yorikim/so/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yorikim/so/git/refs{/sha}","trees_url":"https://api.github.com/repos/yorikim/so/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/{sha}","languages_url":"https://api.github.com/repos/yorikim/so/languages","stargazers_url":"https://api.github.com/repos/yorikim/so/stargazers","contributors_url":"https://api.github.com/repos/yorikim/so/contributors","subscribers_url":"https://api.github.com/repos/yorikim/so/subscribers","subscription_url":"https://api.github.com/repos/yorikim/so/subscription","commits_url":"https://api.github.com/repos/yorikim/so/commits{/sha}","git_commits_url":"https://api.github.com/repos/yorikim/so/git/commits{/sha}","comments_url":"https://api.github.com/repos/yorikim/so/comments{/number}","issue_comment_url":"https://api.github.com/repos/yorikim/so/issues/comments{/number}","contents_url":"https://api.github.com/repos/yorikim/so/contents/{+path}","compare_url":"https://api.github.com/repos/yorikim/so/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yorikim/so/merges","archive_url":"https://api.github.com/repos/yorikim/so/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yorikim/so/downloads","issues_url":"https://api.github.com/repos/yorikim/so/issues{/number}","pulls_url":"https://api.github.com/repos/yorikim/so/pulls{/number}","milestones_url":"https://api.github.com/repos/yorikim/so/milestones{/number}","notifications_url":"https://api.github.com/repos/yorikim/so/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yorikim/so/labels{/name}","releases_url":"https://api.github.com/repos/yorikim/so/releases{/id}","created_at":"2015-11-08T11:12:48Z","updated_at":"2015-11-20T12:37:27Z","pushed_at":"2015-11-23T16:43:33Z","git_url":"git://github.com/yorikim/so.git","ssh_url":"git@github.com:yorikim/so.git","clone_url":"https://github.com/yorikim/so.git","svn_url":"https://github.com/yorikim/so","homepage":null,"size":152,"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":"yorikim:master","ref":"master","sha":"6253a11bdb86270702f9a57f62b0a9748af0a7c6","user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"repo":{"id":45777196,"name":"so","full_name":"yorikim/so","owner":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yorikim/so","description":"simple stack overflow","fork":false,"url":"https://api.github.com/repos/yorikim/so","forks_url":"https://api.github.com/repos/yorikim/so/forks","keys_url":"https://api.github.com/repos/yorikim/so/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yorikim/so/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yorikim/so/teams","hooks_url":"https://api.github.com/repos/yorikim/so/hooks","issue_events_url":"https://api.github.com/repos/yorikim/so/issues/events{/number}","events_url":"https://api.github.com/repos/yorikim/so/events","assignees_url":"https://api.github.com/repos/yorikim/so/assignees{/user}","branches_url":"https://api.github.com/repos/yorikim/so/branches{/branch}","tags_url":"https://api.github.com/repos/yorikim/so/tags","blobs_url":"https://api.github.com/repos/yorikim/so/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yorikim/so/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yorikim/so/git/refs{/sha}","trees_url":"https://api.github.com/repos/yorikim/so/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yorikim/so/statuses/{sha}","languages_url":"https://api.github.com/repos/yorikim/so/languages","stargazers_url":"https://api.github.com/repos/yorikim/so/stargazers","contributors_url":"https://api.github.com/repos/yorikim/so/contributors","subscribers_url":"https://api.github.com/repos/yorikim/so/subscribers","subscription_url":"https://api.github.com/repos/yorikim/so/subscription","commits_url":"https://api.github.com/repos/yorikim/so/commits{/sha}","git_commits_url":"https://api.github.com/repos/yorikim/so/git/commits{/sha}","comments_url":"https://api.github.com/repos/yorikim/so/comments{/number}","issue_comment_url":"https://api.github.com/repos/yorikim/so/issues/comments{/number}","contents_url":"https://api.github.com/repos/yorikim/so/contents/{+path}","compare_url":"https://api.github.com/repos/yorikim/so/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yorikim/so/merges","archive_url":"https://api.github.com/repos/yorikim/so/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yorikim/so/downloads","issues_url":"https://api.github.com/repos/yorikim/so/issues{/number}","pulls_url":"https://api.github.com/repos/yorikim/so/pulls{/number}","milestones_url":"https://api.github.com/repos/yorikim/so/milestones{/number}","notifications_url":"https://api.github.com/repos/yorikim/so/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yorikim/so/labels{/name}","releases_url":"https://api.github.com/repos/yorikim/so/releases{/id}","created_at":"2015-11-08T11:12:48Z","updated_at":"2015-11-20T12:37:27Z","pushed_at":"2015-11-23T16:43:33Z","git_url":"git://github.com/yorikim/so.git","ssh_url":"git@github.com:yorikim/so.git","clone_url":"https://github.com/yorikim/so.git","svn_url":"https://github.com/yorikim/so","homepage":null,"size":152,"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/yorikim/so/pulls/8"},"html":{"href":"https://github.com/yorikim/so/pull/8"},"issue":{"href":"https://api.github.com/repos/yorikim/so/issues/8"},"comments":{"href":"https://api.github.com/repos/yorikim/so/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/yorikim/so/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/yorikim/so/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yorikim/so/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/yorikim/so/statuses/07e3dfe96ed5764401bb2c12a9446f68655560b1"}}}}