{"action":"created","comment":{"url":"https://api.github.com/repos/alexfilenko/qna/pulls/comments/74708364","id":74708364,"diff_hunk":"@@ -0,0 +1,51 @@\n+class QuestionsController < ApplicationController\n+  before_action :load_question, only: [:show, :edit, :update, :destroy]\n+  \n+  def index\n+    @questions = Question.all\n+  end\n+  \n+  def show\n+    @answer = @question.answers.build\n+  end\n+  \n+  def new\n+    @question = Question.new\n+  end\n+  \n+  def edit\n+  end\n+  \n+  def create\n+    @question = Question.new(question_params)\n+    \n+    if @question.save\n+      redirect_to @question\n+    else\n+      render :new\n+    end\n+  end\n+  \n+  def update\n+    if @question.update(question_params)\n+      redirect_to question_path\n+    else\n+      render :edit\n+    end\n+  end\n+  \n+  def destroy\n+    @question.destroy\n+    redirect_to questions_path\n+  end\n+  \n+  private\n+  \n+  def load_question\n+    @question = Question.find(params[:id])\n+  end\n+  \n+  def question_params\n+    params.require(:question).permit(:title, :body, :user_id)","path":"app/controllers/questions_controller.rb","position":49,"original_position":49,"commit_id":"27a61c19da3f486407ab8f59b74cf5e68121c9eb","original_commit_id":"27a61c19da3f486407ab8f59b74cf5e68121c9eb","user":{"login":"webmstk","id":10058472,"avatar_url":"https://avatars.githubusercontent.com/u/10058472?v=3","gravatar_id":"","url":"https://api.github.com/users/webmstk","html_url":"https://github.com/webmstk","followers_url":"https://api.github.com/users/webmstk/followers","following_url":"https://api.github.com/users/webmstk/following{/other_user}","gists_url":"https://api.github.com/users/webmstk/gists{/gist_id}","starred_url":"https://api.github.com/users/webmstk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmstk/subscriptions","organizations_url":"https://api.github.com/users/webmstk/orgs","repos_url":"https://api.github.com/users/webmstk/repos","events_url":"https://api.github.com/users/webmstk/events{/privacy}","received_events_url":"https://api.github.com/users/webmstk/received_events","type":"User","site_admin":false},"body":"!","created_at":"2016-08-14T21:03:01Z","updated_at":"2016-08-14T21:03:01Z","html_url":"https://github.com/alexfilenko/qna/pull/2#discussion_r74708364","pull_request_url":"https://api.github.com/repos/alexfilenko/qna/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/comments/74708364"},"html":{"href":"https://github.com/alexfilenko/qna/pull/2#discussion_r74708364"},"pull_request":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/alexfilenko/qna/pulls/2","id":81212080,"html_url":"https://github.com/alexfilenko/qna/pull/2","diff_url":"https://github.com/alexfilenko/qna/pull/2.diff","patch_url":"https://github.com/alexfilenko/qna/pull/2.patch","issue_url":"https://api.github.com/repos/alexfilenko/qna/issues/2","number":2,"state":"open","locked":false,"title":"Two(video4)","user":{"login":"alexfilenko","id":15911855,"avatar_url":"https://avatars.githubusercontent.com/u/15911855?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfilenko","html_url":"https://github.com/alexfilenko","followers_url":"https://api.github.com/users/alexfilenko/followers","following_url":"https://api.github.com/users/alexfilenko/following{/other_user}","gists_url":"https://api.github.com/users/alexfilenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfilenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfilenko/subscriptions","organizations_url":"https://api.github.com/users/alexfilenko/orgs","repos_url":"https://api.github.com/users/alexfilenko/repos","events_url":"https://api.github.com/users/alexfilenko/events{/privacy}","received_events_url":"https://api.github.com/users/alexfilenko/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-13T09:49:32Z","updated_at":"2016-08-14T21:03:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df8991744a89f3c324e2a93d040052277ee184de","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexfilenko/qna/pulls/2/commits","review_comments_url":"https://api.github.com/repos/alexfilenko/qna/pulls/2/comments","review_comment_url":"https://api.github.com/repos/alexfilenko/qna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexfilenko/qna/issues/2/comments","statuses_url":"https://api.github.com/repos/alexfilenko/qna/statuses/27a61c19da3f486407ab8f59b74cf5e68121c9eb","head":{"label":"alexfilenko:two(video4)","ref":"two(video4)","sha":"27a61c19da3f486407ab8f59b74cf5e68121c9eb","user":{"login":"alexfilenko","id":15911855,"avatar_url":"https://avatars.githubusercontent.com/u/15911855?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfilenko","html_url":"https://github.com/alexfilenko","followers_url":"https://api.github.com/users/alexfilenko/followers","following_url":"https://api.github.com/users/alexfilenko/following{/other_user}","gists_url":"https://api.github.com/users/alexfilenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfilenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfilenko/subscriptions","organizations_url":"https://api.github.com/users/alexfilenko/orgs","repos_url":"https://api.github.com/users/alexfilenko/repos","events_url":"https://api.github.com/users/alexfilenko/events{/privacy}","received_events_url":"https://api.github.com/users/alexfilenko/received_events","type":"User","site_admin":false},"repo":{"id":65309659,"name":"qna","full_name":"alexfilenko/qna","owner":{"login":"alexfilenko","id":15911855,"avatar_url":"https://avatars.githubusercontent.com/u/15911855?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfilenko","html_url":"https://github.com/alexfilenko","followers_url":"https://api.github.com/users/alexfilenko/followers","following_url":"https://api.github.com/users/alexfilenko/following{/other_user}","gists_url":"https://api.github.com/users/alexfilenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfilenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfilenko/subscriptions","organizations_url":"https://api.github.com/users/alexfilenko/orgs","repos_url":"https://api.github.com/users/alexfilenko/repos","events_url":"https://api.github.com/users/alexfilenko/events{/privacy}","received_events_url":"https://api.github.com/users/alexfilenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexfilenko/qna","description":"thinknetica","fork":false,"url":"https://api.github.com/repos/alexfilenko/qna","forks_url":"https://api.github.com/repos/alexfilenko/qna/forks","keys_url":"https://api.github.com/repos/alexfilenko/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexfilenko/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexfilenko/qna/teams","hooks_url":"https://api.github.com/repos/alexfilenko/qna/hooks","issue_events_url":"https://api.github.com/repos/alexfilenko/qna/issues/events{/number}","events_url":"https://api.github.com/repos/alexfilenko/qna/events","assignees_url":"https://api.github.com/repos/alexfilenko/qna/assignees{/user}","branches_url":"https://api.github.com/repos/alexfilenko/qna/branches{/branch}","tags_url":"https://api.github.com/repos/alexfilenko/qna/tags","blobs_url":"https://api.github.com/repos/alexfilenko/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexfilenko/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexfilenko/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexfilenko/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexfilenko/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/alexfilenko/qna/languages","stargazers_url":"https://api.github.com/repos/alexfilenko/qna/stargazers","contributors_url":"https://api.github.com/repos/alexfilenko/qna/contributors","subscribers_url":"https://api.github.com/repos/alexfilenko/qna/subscribers","subscription_url":"https://api.github.com/repos/alexfilenko/qna/subscription","commits_url":"https://api.github.com/repos/alexfilenko/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexfilenko/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexfilenko/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexfilenko/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexfilenko/qna/contents/{+path}","compare_url":"https://api.github.com/repos/alexfilenko/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexfilenko/qna/merges","archive_url":"https://api.github.com/repos/alexfilenko/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexfilenko/qna/downloads","issues_url":"https://api.github.com/repos/alexfilenko/qna/issues{/number}","pulls_url":"https://api.github.com/repos/alexfilenko/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/alexfilenko/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/alexfilenko/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexfilenko/qna/labels{/name}","releases_url":"https://api.github.com/repos/alexfilenko/qna/releases{/id}","deployments_url":"https://api.github.com/repos/alexfilenko/qna/deployments","created_at":"2016-08-09T16:12:31Z","updated_at":"2016-08-09T16:12:38Z","pushed_at":"2016-08-14T21:01:16Z","git_url":"git://github.com/alexfilenko/qna.git","ssh_url":"git@github.com:alexfilenko/qna.git","clone_url":"https://github.com/alexfilenko/qna.git","svn_url":"https://github.com/alexfilenko/qna","homepage":null,"size":64,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alexfilenko:master","ref":"master","sha":"91f66adaac712c02557c520249561c11f8b14c74","user":{"login":"alexfilenko","id":15911855,"avatar_url":"https://avatars.githubusercontent.com/u/15911855?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfilenko","html_url":"https://github.com/alexfilenko","followers_url":"https://api.github.com/users/alexfilenko/followers","following_url":"https://api.github.com/users/alexfilenko/following{/other_user}","gists_url":"https://api.github.com/users/alexfilenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfilenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfilenko/subscriptions","organizations_url":"https://api.github.com/users/alexfilenko/orgs","repos_url":"https://api.github.com/users/alexfilenko/repos","events_url":"https://api.github.com/users/alexfilenko/events{/privacy}","received_events_url":"https://api.github.com/users/alexfilenko/received_events","type":"User","site_admin":false},"repo":{"id":65309659,"name":"qna","full_name":"alexfilenko/qna","owner":{"login":"alexfilenko","id":15911855,"avatar_url":"https://avatars.githubusercontent.com/u/15911855?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfilenko","html_url":"https://github.com/alexfilenko","followers_url":"https://api.github.com/users/alexfilenko/followers","following_url":"https://api.github.com/users/alexfilenko/following{/other_user}","gists_url":"https://api.github.com/users/alexfilenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfilenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfilenko/subscriptions","organizations_url":"https://api.github.com/users/alexfilenko/orgs","repos_url":"https://api.github.com/users/alexfilenko/repos","events_url":"https://api.github.com/users/alexfilenko/events{/privacy}","received_events_url":"https://api.github.com/users/alexfilenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexfilenko/qna","description":"thinknetica","fork":false,"url":"https://api.github.com/repos/alexfilenko/qna","forks_url":"https://api.github.com/repos/alexfilenko/qna/forks","keys_url":"https://api.github.com/repos/alexfilenko/qna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexfilenko/qna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexfilenko/qna/teams","hooks_url":"https://api.github.com/repos/alexfilenko/qna/hooks","issue_events_url":"https://api.github.com/repos/alexfilenko/qna/issues/events{/number}","events_url":"https://api.github.com/repos/alexfilenko/qna/events","assignees_url":"https://api.github.com/repos/alexfilenko/qna/assignees{/user}","branches_url":"https://api.github.com/repos/alexfilenko/qna/branches{/branch}","tags_url":"https://api.github.com/repos/alexfilenko/qna/tags","blobs_url":"https://api.github.com/repos/alexfilenko/qna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexfilenko/qna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexfilenko/qna/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexfilenko/qna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexfilenko/qna/statuses/{sha}","languages_url":"https://api.github.com/repos/alexfilenko/qna/languages","stargazers_url":"https://api.github.com/repos/alexfilenko/qna/stargazers","contributors_url":"https://api.github.com/repos/alexfilenko/qna/contributors","subscribers_url":"https://api.github.com/repos/alexfilenko/qna/subscribers","subscription_url":"https://api.github.com/repos/alexfilenko/qna/subscription","commits_url":"https://api.github.com/repos/alexfilenko/qna/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexfilenko/qna/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexfilenko/qna/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexfilenko/qna/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexfilenko/qna/contents/{+path}","compare_url":"https://api.github.com/repos/alexfilenko/qna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexfilenko/qna/merges","archive_url":"https://api.github.com/repos/alexfilenko/qna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexfilenko/qna/downloads","issues_url":"https://api.github.com/repos/alexfilenko/qna/issues{/number}","pulls_url":"https://api.github.com/repos/alexfilenko/qna/pulls{/number}","milestones_url":"https://api.github.com/repos/alexfilenko/qna/milestones{/number}","notifications_url":"https://api.github.com/repos/alexfilenko/qna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexfilenko/qna/labels{/name}","releases_url":"https://api.github.com/repos/alexfilenko/qna/releases{/id}","deployments_url":"https://api.github.com/repos/alexfilenko/qna/deployments","created_at":"2016-08-09T16:12:31Z","updated_at":"2016-08-09T16:12:38Z","pushed_at":"2016-08-14T21:01:16Z","git_url":"git://github.com/alexfilenko/qna.git","ssh_url":"git@github.com:alexfilenko/qna.git","clone_url":"https://github.com/alexfilenko/qna.git","svn_url":"https://github.com/alexfilenko/qna","homepage":null,"size":64,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/2"},"html":{"href":"https://github.com/alexfilenko/qna/pull/2"},"issue":{"href":"https://api.github.com/repos/alexfilenko/qna/issues/2"},"comments":{"href":"https://api.github.com/repos/alexfilenko/qna/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexfilenko/qna/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/alexfilenko/qna/statuses/27a61c19da3f486407ab8f59b74cf5e68121c9eb"}}}}
{"actor":{"display_login":"webmstk"}}