{"action":"created","comment":{"url":"https://api.github.com/repos/max-underthesun/qna/pulls/comments/47443094","id":47443094,"diff_hunk":"@@ -0,0 +1,21 @@\n+var errors;\n+errors = function(answer_id) {\n+  return $('#' + answer_id + '.answer-errors');\n+};\n+\n+<% if @answer.errors.present? %>\n+  var field_with_errors;\n+  field_with_errors = $('#edit_answer_' + '<%= @answer.id %>' + '.edit_answer .form-group');\n+\n+  errors(<%= @answer.id %>).html('<%= j render 'common/errors', resource: @answer %>');\n+  field_with_errors.addClass('field_with_errors');\n+<% elsif flash[:notice] == I18n.t('confirmations.answers.update') =%>","path":"app/views/answers/update.js.erb","position":null,"original_position":12,"commit_id":"13ed7d1d1b8ee1cedec099a729540057916f792a","original_commit_id":"82f88362b9b54b35543bb6f1b5ff403095c19ea4","user":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"body":"пока поменял проверку флеша на проверку статуса ","created_at":"2015-12-13T11:11:19Z","updated_at":"2015-12-13T11:11:19Z","html_url":"https://github.com/max-underthesun/qna/pull/5#discussion_r47443094","pull_request_url":"https://api.github.com/repos/max-underthesun/qna/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/max-underthesun/qna/pulls/comments/47443094"},"html":{"href":"https://github.com/max-underthesun/qna/pull/5#discussion_r47443094"},"pull_request":{"href":"https://api.github.com/repos/max-underthesun/qna/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/max-underthesun/qna/pulls/5","id":53382573,"html_url":"https://github.com/max-underthesun/qna/pull/5","diff_url":"https://github.com/max-underthesun/qna/pull/5.diff","patch_url":"https://github.com/max-underthesun/qna/pull/5.patch","issue_url":"https://api.github.com/repos/max-underthesun/qna/issues/5","number":5,"state":"open","locked":false,"title":"задание по занятию №7","user":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"body":" - тесты в некоторых моментах избыточные\r\n - аналогично тестам, есть избыточные моменты во вьюхах и контроллерах \r\n\r\nбольшая часть избыточности допущена мной сознательно, с целью \"выжать максимум обучения\" из задания\r\n   \r\nпример: \r\nреализован вывод ошибки авторизации, при попытке апдейта (или удаления) ответа \"не автором\", при этом у \"не автора\" во вьюхе просто нет ссылки на эти действия...\r\nтем не менее везде сделал эту фишку во-первых с целью научиться делать этот вывод, во-вторых из принципа \"не доверяй вьюхам\"\r\nкогда писал код проверял, чтобы все эти \"параноидальные фишечки\" работали в случае отключения фильтра во вьюхе\r\n\r\n","created_at":"2015-12-11T11:36:56Z","updated_at":"2015-12-13T11:11:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e301f73720ab374714283d5a9654680a2b83d8cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/max-underthesun/qna/pulls/5/commits","review_comments_url":"https://api.github.com/repos/max-underthesun/qna/pulls/5/comments","review_comment_url":"https://api.github.com/repos/max-underthesun/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/max-underthesun/qna/issues/5/comments","statuses_url":"https://api.github.com/repos/max-underthesun/qna/statuses/13ed7d1d1b8ee1cedec099a729540057916f792a","head":{"label":"max-underthesun:finish_l7","ref":"finish_l7","sha":"13ed7d1d1b8ee1cedec099a729540057916f792a","user":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"repo":{"id":45785229,"name":"qna","full_name":"max-underthesun/qna","owner":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/max-underthesun/qna","description":"","fork":false,"url":"https://api.github.com/repos/max-underthesun/qna","forks_url":"https://api.github.com/repos/max-underthesun/qna/forks","keys_url":"https://api.github.com/repos/max-underthesun/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/max-underthesun/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/max-underthesun/qna/teams","hooks_url":"https://api.github.com/repos/max-underthesun/qna/hooks","issue_events_url":"https://api.github.com/repos/max-underthesun/qna/issues/events{/number}","events_url":"https://api.github.com/repos/max-underthesun/qna/events","assignees_url":"https://api.github.com/repos/max-underthesun/qna/assignees{/user}","branches_url":"https://api.github.com/repos/max-underthesun/qna/branches{/branch}","tags_url":"https://api.github.com/repos/max-underthesun/qna/tags","blobs_url":"https://api.github.com/repos/max-underthesun/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/max-underthesun/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/max-underthesun/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/max-underthesun/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/max-underthesun/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/max-underthesun/qna/languages","stargazers_url":"https://api.github.com/repos/max-underthesun/qna/stargazers","contributors_url":"https://api.github.com/repos/max-underthesun/qna/contributors","subscribers_url":"https://api.github.com/repos/max-underthesun/qna/subscribers","subscription_url":"https://api.github.com/repos/max-underthesun/qna/subscription","commits_url":"https://api.github.com/repos/max-underthesun/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/max-underthesun/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/max-underthesun/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/max-underthesun/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/max-underthesun/qna/contents/{+path}","compare_url":"https://api.github.com/repos/max-underthesun/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/max-underthesun/qna/merges","archive_url":"https://api.github.com/repos/max-underthesun/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/max-underthesun/qna/downloads","issues_url":"https://api.github.com/repos/max-underthesun/qna/issues{/number}","pulls_url":"https://api.github.com/repos/max-underthesun/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/max-underthesun/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/max-underthesun/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/max-underthesun/qna/labels{/name}","releases_url":"https://api.github.com/repos/max-underthesun/qna/releases{/id}","created_at":"2015-11-08T15:05:35Z","updated_at":"2015-11-08T15:11:44Z","pushed_at":"2015-12-13T11:09:46Z","git_url":"git://github.com/max-underthesun/qna.git","ssh_url":"git@github.com:max-underthesun/qna.git","clone_url":"https://github.com/max-underthesun/qna.git","svn_url":"https://github.com/max-underthesun/qna","homepage":null,"size":161,"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":"max-underthesun:master","ref":"master","sha":"1d86713b938780ac623d6938e5ded8432cfc4296","user":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"repo":{"id":45785229,"name":"qna","full_name":"max-underthesun/qna","owner":{"login":"max-underthesun","id":13752607,"avatar_url":"https://avatars.githubusercontent.com/u/13752607?v=3","gravatar_id":"","url":"https://api.github.com/users/max-underthesun","html_url":"https://github.com/max-underthesun","followers_url":"https://api.github.com/users/max-underthesun/followers","following_url":"https://api.github.com/users/max-underthesun/following{/other_user}","gists_url":"https://api.github.com/users/max-underthesun/gists{/gist_id}","starred_url":"https://api.github.com/users/max-underthesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-underthesun/subscriptions","organizations_url":"https://api.github.com/users/max-underthesun/orgs","repos_url":"https://api.github.com/users/max-underthesun/repos","events_url":"https://api.github.com/users/max-underthesun/events{/privacy}","received_events_url":"https://api.github.com/users/max-underthesun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/max-underthesun/qna","description":"","fork":false,"url":"https://api.github.com/repos/max-underthesun/qna","forks_url":"https://api.github.com/repos/max-underthesun/qna/forks","keys_url":"https://api.github.com/repos/max-underthesun/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/max-underthesun/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/max-underthesun/qna/teams","hooks_url":"https://api.github.com/repos/max-underthesun/qna/hooks","issue_events_url":"https://api.github.com/repos/max-underthesun/qna/issues/events{/number}","events_url":"https://api.github.com/repos/max-underthesun/qna/events","assignees_url":"https://api.github.com/repos/max-underthesun/qna/assignees{/user}","branches_url":"https://api.github.com/repos/max-underthesun/qna/branches{/branch}","tags_url":"https://api.github.com/repos/max-underthesun/qna/tags","blobs_url":"https://api.github.com/repos/max-underthesun/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/max-underthesun/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/max-underthesun/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/max-underthesun/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/max-underthesun/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/max-underthesun/qna/languages","stargazers_url":"https://api.github.com/repos/max-underthesun/qna/stargazers","contributors_url":"https://api.github.com/repos/max-underthesun/qna/contributors","subscribers_url":"https://api.github.com/repos/max-underthesun/qna/subscribers","subscription_url":"https://api.github.com/repos/max-underthesun/qna/subscription","commits_url":"https://api.github.com/repos/max-underthesun/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/max-underthesun/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/max-underthesun/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/max-underthesun/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/max-underthesun/qna/contents/{+path}","compare_url":"https://api.github.com/repos/max-underthesun/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/max-underthesun/qna/merges","archive_url":"https://api.github.com/repos/max-underthesun/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/max-underthesun/qna/downloads","issues_url":"https://api.github.com/repos/max-underthesun/qna/issues{/number}","pulls_url":"https://api.github.com/repos/max-underthesun/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/max-underthesun/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/max-underthesun/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/max-underthesun/qna/labels{/name}","releases_url":"https://api.github.com/repos/max-underthesun/qna/releases{/id}","created_at":"2015-11-08T15:05:35Z","updated_at":"2015-11-08T15:11:44Z","pushed_at":"2015-12-13T11:09:46Z","git_url":"git://github.com/max-underthesun/qna.git","ssh_url":"git@github.com:max-underthesun/qna.git","clone_url":"https://github.com/max-underthesun/qna.git","svn_url":"https://github.com/max-underthesun/qna","homepage":null,"size":161,"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/max-underthesun/qna/pulls/5"},"html":{"href":"https://github.com/max-underthesun/qna/pull/5"},"issue":{"href":"https://api.github.com/repos/max-underthesun/qna/issues/5"},"comments":{"href":"https://api.github.com/repos/max-underthesun/qna/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/max-underthesun/qna/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/max-underthesun/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/max-underthesun/qna/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/max-underthesun/qna/statuses/13ed7d1d1b8ee1cedec099a729540057916f792a"}}}}