{"action":"created","comment":{"url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/comments/77544543","id":77544543,"diff_hunk":"@@ -16,9 +19,12 @@ def edit\n \n   def create\n     @question = Question.new(question_params)\n+    @question.user = current_user\n     if @question.save\n+      flash[:success] = 'Your question successfully created'\n       redirect_to @question\n     else\n+      flash[:danger] = @question.errors.full_messages.to_sentence","path":"app/controllers/questions_controller.rb","position":23,"original_position":23,"commit_id":"d2021125b35554e99526499afed58cdda8b6fb71","original_commit_id":"d2021125b35554e99526499afed58cdda8b6fb71","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":"При рендере нет смысла во флеш-сообщениях, лучше вывести ошибки валидации в виде. Сделай отдельный релсьовый проект и сгенерируй с помощью скаффолдинга какой-нибудь ресурс. И посмотри как в формах рельсы выводят ошибки. Вот нужно примерно также, только не дублировать, а вынести это в паршл.","created_at":"2016-09-05T16:54:09Z","updated_at":"2016-09-05T16:54:09Z","html_url":"https://github.com/MaksymKutyshenko/qna-app/pull/3#discussion_r77544543","pull_request_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/comments/77544543"},"html":{"href":"https://github.com/MaksymKutyshenko/qna-app/pull/3#discussion_r77544543"},"pull_request":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3","id":83018869,"html_url":"https://github.com/MaksymKutyshenko/qna-app/pull/3","diff_url":"https://github.com/MaksymKutyshenko/qna-app/pull/3.diff","patch_url":"https://github.com/MaksymKutyshenko/qna-app/pull/3.patch","issue_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/3","number":3,"state":"open","locked":false,"title":"Task #5","user":{"login":"MaksymKutyshenko","id":15714417,"avatar_url":"https://avatars.githubusercontent.com/u/15714417?v=3","gravatar_id":"","url":"https://api.github.com/users/MaksymKutyshenko","html_url":"https://github.com/MaksymKutyshenko","followers_url":"https://api.github.com/users/MaksymKutyshenko/followers","following_url":"https://api.github.com/users/MaksymKutyshenko/following{/other_user}","gists_url":"https://api.github.com/users/MaksymKutyshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/MaksymKutyshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaksymKutyshenko/subscriptions","organizations_url":"https://api.github.com/users/MaksymKutyshenko/orgs","repos_url":"https://api.github.com/users/MaksymKutyshenko/repos","events_url":"https://api.github.com/users/MaksymKutyshenko/events{/privacy}","received_events_url":"https://api.github.com/users/MaksymKutyshenko/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-28T15:32:32Z","updated_at":"2016-09-05T16:54:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c4f6c4afb20f78e8456adb7dcbd7dbfb34dd250","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3/commits","review_comments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3/comments","review_comment_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/3/comments","statuses_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/statuses/d2021125b35554e99526499afed58cdda8b6fb71","head":{"label":"MaksymKutyshenko:feat","ref":"feat","sha":"d2021125b35554e99526499afed58cdda8b6fb71","user":{"login":"MaksymKutyshenko","id":15714417,"avatar_url":"https://avatars.githubusercontent.com/u/15714417?v=3","gravatar_id":"","url":"https://api.github.com/users/MaksymKutyshenko","html_url":"https://github.com/MaksymKutyshenko","followers_url":"https://api.github.com/users/MaksymKutyshenko/followers","following_url":"https://api.github.com/users/MaksymKutyshenko/following{/other_user}","gists_url":"https://api.github.com/users/MaksymKutyshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/MaksymKutyshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaksymKutyshenko/subscriptions","organizations_url":"https://api.github.com/users/MaksymKutyshenko/orgs","repos_url":"https://api.github.com/users/MaksymKutyshenko/repos","events_url":"https://api.github.com/users/MaksymKutyshenko/events{/privacy}","received_events_url":"https://api.github.com/users/MaksymKutyshenko/received_events","type":"User","site_admin":false},"repo":{"id":65579700,"name":"qna-app","full_name":"MaksymKutyshenko/qna-app","owner":{"login":"MaksymKutyshenko","id":15714417,"avatar_url":"https://avatars.githubusercontent.com/u/15714417?v=3","gravatar_id":"","url":"https://api.github.com/users/MaksymKutyshenko","html_url":"https://github.com/MaksymKutyshenko","followers_url":"https://api.github.com/users/MaksymKutyshenko/followers","following_url":"https://api.github.com/users/MaksymKutyshenko/following{/other_user}","gists_url":"https://api.github.com/users/MaksymKutyshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/MaksymKutyshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaksymKutyshenko/subscriptions","organizations_url":"https://api.github.com/users/MaksymKutyshenko/orgs","repos_url":"https://api.github.com/users/MaksymKutyshenko/repos","events_url":"https://api.github.com/users/MaksymKutyshenko/events{/privacy}","received_events_url":"https://api.github.com/users/MaksymKutyshenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaksymKutyshenko/qna-app","description":null,"fork":false,"url":"https://api.github.com/repos/MaksymKutyshenko/qna-app","forks_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/forks","keys_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/teams","hooks_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/hooks","issue_events_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/events{/number}","events_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/events","assignees_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/assignees{/user}","branches_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/branches{/branch}","tags_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/tags","blobs_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/statuses/{sha}","languages_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/languages","stargazers_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/stargazers","contributors_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/contributors","subscribers_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/subscribers","subscription_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/subscription","commits_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/contents/{+path}","compare_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/merges","archive_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/downloads","issues_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues{/number}","pulls_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls{/number}","milestones_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/milestones{/number}","notifications_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/labels{/name}","releases_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/releases{/id}","deployments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/deployments","created_at":"2016-08-12T19:52:09Z","updated_at":"2016-08-12T19:53:35Z","pushed_at":"2016-09-05T10:20:35Z","git_url":"git://github.com/MaksymKutyshenko/qna-app.git","ssh_url":"git@github.com:MaksymKutyshenko/qna-app.git","clone_url":"https://github.com/MaksymKutyshenko/qna-app.git","svn_url":"https://github.com/MaksymKutyshenko/qna-app","homepage":null,"size":75,"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":"MaksymKutyshenko:master","ref":"master","sha":"a33f35c8481fe0aff395c0dac2aa4b205f39b2d9","user":{"login":"MaksymKutyshenko","id":15714417,"avatar_url":"https://avatars.githubusercontent.com/u/15714417?v=3","gravatar_id":"","url":"https://api.github.com/users/MaksymKutyshenko","html_url":"https://github.com/MaksymKutyshenko","followers_url":"https://api.github.com/users/MaksymKutyshenko/followers","following_url":"https://api.github.com/users/MaksymKutyshenko/following{/other_user}","gists_url":"https://api.github.com/users/MaksymKutyshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/MaksymKutyshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaksymKutyshenko/subscriptions","organizations_url":"https://api.github.com/users/MaksymKutyshenko/orgs","repos_url":"https://api.github.com/users/MaksymKutyshenko/repos","events_url":"https://api.github.com/users/MaksymKutyshenko/events{/privacy}","received_events_url":"https://api.github.com/users/MaksymKutyshenko/received_events","type":"User","site_admin":false},"repo":{"id":65579700,"name":"qna-app","full_name":"MaksymKutyshenko/qna-app","owner":{"login":"MaksymKutyshenko","id":15714417,"avatar_url":"https://avatars.githubusercontent.com/u/15714417?v=3","gravatar_id":"","url":"https://api.github.com/users/MaksymKutyshenko","html_url":"https://github.com/MaksymKutyshenko","followers_url":"https://api.github.com/users/MaksymKutyshenko/followers","following_url":"https://api.github.com/users/MaksymKutyshenko/following{/other_user}","gists_url":"https://api.github.com/users/MaksymKutyshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/MaksymKutyshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaksymKutyshenko/subscriptions","organizations_url":"https://api.github.com/users/MaksymKutyshenko/orgs","repos_url":"https://api.github.com/users/MaksymKutyshenko/repos","events_url":"https://api.github.com/users/MaksymKutyshenko/events{/privacy}","received_events_url":"https://api.github.com/users/MaksymKutyshenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaksymKutyshenko/qna-app","description":null,"fork":false,"url":"https://api.github.com/repos/MaksymKutyshenko/qna-app","forks_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/forks","keys_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/teams","hooks_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/hooks","issue_events_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/events{/number}","events_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/events","assignees_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/assignees{/user}","branches_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/branches{/branch}","tags_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/tags","blobs_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/statuses/{sha}","languages_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/languages","stargazers_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/stargazers","contributors_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/contributors","subscribers_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/subscribers","subscription_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/subscription","commits_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/contents/{+path}","compare_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/merges","archive_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/downloads","issues_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues{/number}","pulls_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls{/number}","milestones_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/milestones{/number}","notifications_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/labels{/name}","releases_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/releases{/id}","deployments_url":"https://api.github.com/repos/MaksymKutyshenko/qna-app/deployments","created_at":"2016-08-12T19:52:09Z","updated_at":"2016-08-12T19:53:35Z","pushed_at":"2016-09-05T10:20:35Z","git_url":"git://github.com/MaksymKutyshenko/qna-app.git","ssh_url":"git@github.com:MaksymKutyshenko/qna-app.git","clone_url":"https://github.com/MaksymKutyshenko/qna-app.git","svn_url":"https://github.com/MaksymKutyshenko/qna-app","homepage":null,"size":75,"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/MaksymKutyshenko/qna-app/pulls/3"},"html":{"href":"https://github.com/MaksymKutyshenko/qna-app/pull/3"},"issue":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/3"},"comments":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/MaksymKutyshenko/qna-app/statuses/d2021125b35554e99526499afed58cdda8b6fb71"}}}}
{"actor":{"display_login":"vkurennov"}}