{"action":"created","comment":{"url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/comments/123706115","pull_request_review_id":45936478,"id":123706115,"diff_hunk":"@@ -0,0 +1,68 @@\n+class UsersController < ApplicationController\n+  before_action :logged_in_user, only: [:index, :edit, :update, :destroy]\n+  before_action :correct_user, only: [:edit, :update]\n+  before_action :admin_user,  only: :destroy\n+  \n+  def index\n+    @users = User.paginate(page: params[:page])\n+  end\n+  \n+  def new\n+    @user = User.new\n+  end\n+  \n+  def show\n+    @user = User.find(params[:id])\n+  end\n+  \n+  def create\n+    @user = User.new(user_params)\n+    if @user.save\n+      log_in @user\n+      flash[:success] = \"ようこそ\"\n+      redirect_to @user\n+    else\n+      render 'new'\n+    end\n+  end\n+  \n+  def edit\n+  end\n+  \n+  def update\n+    if @user.update_attributes(user_params)\n+      flash[:success] = \"プロフールを更新しました\"\n+      redirect_to @user\n+    else\n+      render 'edit'\n+    end\n+  end\n+  \n+  def destroy\n+    User.find(params[:id]).destroy","path":"app/controllers/users_controller.rb","position":42,"original_position":42,"commit_id":"f4d256beb6eda9e8549f3f926c96cf320ccb1f86","original_commit_id":"f4d256beb6eda9e8549f3f926c96cf320ccb1f86","user":{"login":"neoknight8","id":25631470,"avatar_url":"https://avatars1.githubusercontent.com/u/25631470?v=3","gravatar_id":"","url":"https://api.github.com/users/neoknight8","html_url":"https://github.com/neoknight8","followers_url":"https://api.github.com/users/neoknight8/followers","following_url":"https://api.github.com/users/neoknight8/following{/other_user}","gists_url":"https://api.github.com/users/neoknight8/gists{/gist_id}","starred_url":"https://api.github.com/users/neoknight8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoknight8/subscriptions","organizations_url":"https://api.github.com/users/neoknight8/orgs","repos_url":"https://api.github.com/users/neoknight8/repos","events_url":"https://api.github.com/users/neoknight8/events{/privacy}","received_events_url":"https://api.github.com/users/neoknight8/received_events","type":"User","site_admin":false},"body":"destroyも成功時と失敗時で場合分け欲しいです。","created_at":"2017-06-23T09:20:14Z","updated_at":"2017-06-23T09:20:14Z","html_url":"https://github.com/yukimiowo/twitterlike_app/pull/1#discussion_r123706115","pull_request_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/comments/123706115"},"html":{"href":"https://github.com/yukimiowo/twitterlike_app/pull/1#discussion_r123706115"},"pull_request":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1","id":126012300,"html_url":"https://github.com/yukimiowo/twitterlike_app/pull/1","diff_url":"https://github.com/yukimiowo/twitterlike_app/pull/1.diff","patch_url":"https://github.com/yukimiowo/twitterlike_app/pull/1.patch","issue_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/1","number":1,"state":"open","locked":false,"title":"Twitterlike app","user":{"login":"yukimiowo","id":22588218,"avatar_url":"https://avatars1.githubusercontent.com/u/22588218?v=3","gravatar_id":"","url":"https://api.github.com/users/yukimiowo","html_url":"https://github.com/yukimiowo","followers_url":"https://api.github.com/users/yukimiowo/followers","following_url":"https://api.github.com/users/yukimiowo/following{/other_user}","gists_url":"https://api.github.com/users/yukimiowo/gists{/gist_id}","starred_url":"https://api.github.com/users/yukimiowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukimiowo/subscriptions","organizations_url":"https://api.github.com/users/yukimiowo/orgs","repos_url":"https://api.github.com/users/yukimiowo/repos","events_url":"https://api.github.com/users/yukimiowo/events{/privacy}","received_events_url":"https://api.github.com/users/yukimiowo/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-16T11:19:10Z","updated_at":"2017-06-23T09:20:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6510fe3fd49d57184890b75247b67c9f78847565","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1/commits","review_comments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1/comments","review_comment_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/1/comments","statuses_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/statuses/f4d256beb6eda9e8549f3f926c96cf320ccb1f86","head":{"label":"yukimiowo:twitterlike-app","ref":"twitterlike-app","sha":"f4d256beb6eda9e8549f3f926c96cf320ccb1f86","user":{"login":"yukimiowo","id":22588218,"avatar_url":"https://avatars1.githubusercontent.com/u/22588218?v=3","gravatar_id":"","url":"https://api.github.com/users/yukimiowo","html_url":"https://github.com/yukimiowo","followers_url":"https://api.github.com/users/yukimiowo/followers","following_url":"https://api.github.com/users/yukimiowo/following{/other_user}","gists_url":"https://api.github.com/users/yukimiowo/gists{/gist_id}","starred_url":"https://api.github.com/users/yukimiowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukimiowo/subscriptions","organizations_url":"https://api.github.com/users/yukimiowo/orgs","repos_url":"https://api.github.com/users/yukimiowo/repos","events_url":"https://api.github.com/users/yukimiowo/events{/privacy}","received_events_url":"https://api.github.com/users/yukimiowo/received_events","type":"User","site_admin":false},"repo":{"id":94506006,"name":"twitterlike_app","full_name":"yukimiowo/twitterlike_app","owner":{"login":"yukimiowo","id":22588218,"avatar_url":"https://avatars1.githubusercontent.com/u/22588218?v=3","gravatar_id":"","url":"https://api.github.com/users/yukimiowo","html_url":"https://github.com/yukimiowo","followers_url":"https://api.github.com/users/yukimiowo/followers","following_url":"https://api.github.com/users/yukimiowo/following{/other_user}","gists_url":"https://api.github.com/users/yukimiowo/gists{/gist_id}","starred_url":"https://api.github.com/users/yukimiowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukimiowo/subscriptions","organizations_url":"https://api.github.com/users/yukimiowo/orgs","repos_url":"https://api.github.com/users/yukimiowo/repos","events_url":"https://api.github.com/users/yukimiowo/events{/privacy}","received_events_url":"https://api.github.com/users/yukimiowo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yukimiowo/twitterlike_app","description":"twitter風のアプリ","fork":false,"url":"https://api.github.com/repos/yukimiowo/twitterlike_app","forks_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/forks","keys_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/teams","hooks_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/hooks","issue_events_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/events{/number}","events_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/events","assignees_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/assignees{/user}","branches_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/branches{/branch}","tags_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/tags","blobs_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/statuses/{sha}","languages_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/languages","stargazers_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/stargazers","contributors_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/contributors","subscribers_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/subscribers","subscription_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/subscription","commits_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/contents/{+path}","compare_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/merges","archive_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/downloads","issues_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues{/number}","pulls_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls{/number}","milestones_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/milestones{/number}","notifications_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/labels{/name}","releases_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/releases{/id}","deployments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/deployments","created_at":"2017-06-16T04:47:16Z","updated_at":"2017-06-16T04:49:10Z","pushed_at":"2017-06-23T07:46:53Z","git_url":"git://github.com/yukimiowo/twitterlike_app.git","ssh_url":"git@github.com:yukimiowo/twitterlike_app.git","clone_url":"https://github.com/yukimiowo/twitterlike_app.git","svn_url":"https://github.com/yukimiowo/twitterlike_app","homepage":null,"size":51,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":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":"yukimiowo:master","ref":"master","sha":"e1c9067eb3ac1b58731113e5218c25b84148c809","user":{"login":"yukimiowo","id":22588218,"avatar_url":"https://avatars1.githubusercontent.com/u/22588218?v=3","gravatar_id":"","url":"https://api.github.com/users/yukimiowo","html_url":"https://github.com/yukimiowo","followers_url":"https://api.github.com/users/yukimiowo/followers","following_url":"https://api.github.com/users/yukimiowo/following{/other_user}","gists_url":"https://api.github.com/users/yukimiowo/gists{/gist_id}","starred_url":"https://api.github.com/users/yukimiowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukimiowo/subscriptions","organizations_url":"https://api.github.com/users/yukimiowo/orgs","repos_url":"https://api.github.com/users/yukimiowo/repos","events_url":"https://api.github.com/users/yukimiowo/events{/privacy}","received_events_url":"https://api.github.com/users/yukimiowo/received_events","type":"User","site_admin":false},"repo":{"id":94506006,"name":"twitterlike_app","full_name":"yukimiowo/twitterlike_app","owner":{"login":"yukimiowo","id":22588218,"avatar_url":"https://avatars1.githubusercontent.com/u/22588218?v=3","gravatar_id":"","url":"https://api.github.com/users/yukimiowo","html_url":"https://github.com/yukimiowo","followers_url":"https://api.github.com/users/yukimiowo/followers","following_url":"https://api.github.com/users/yukimiowo/following{/other_user}","gists_url":"https://api.github.com/users/yukimiowo/gists{/gist_id}","starred_url":"https://api.github.com/users/yukimiowo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukimiowo/subscriptions","organizations_url":"https://api.github.com/users/yukimiowo/orgs","repos_url":"https://api.github.com/users/yukimiowo/repos","events_url":"https://api.github.com/users/yukimiowo/events{/privacy}","received_events_url":"https://api.github.com/users/yukimiowo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yukimiowo/twitterlike_app","description":"twitter風のアプリ","fork":false,"url":"https://api.github.com/repos/yukimiowo/twitterlike_app","forks_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/forks","keys_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/teams","hooks_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/hooks","issue_events_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/events{/number}","events_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/events","assignees_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/assignees{/user}","branches_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/branches{/branch}","tags_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/tags","blobs_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/statuses/{sha}","languages_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/languages","stargazers_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/stargazers","contributors_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/contributors","subscribers_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/subscribers","subscription_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/subscription","commits_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/contents/{+path}","compare_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/merges","archive_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/downloads","issues_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues{/number}","pulls_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls{/number}","milestones_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/milestones{/number}","notifications_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/labels{/name}","releases_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/releases{/id}","deployments_url":"https://api.github.com/repos/yukimiowo/twitterlike_app/deployments","created_at":"2017-06-16T04:47:16Z","updated_at":"2017-06-16T04:49:10Z","pushed_at":"2017-06-23T07:46:53Z","git_url":"git://github.com/yukimiowo/twitterlike_app.git","ssh_url":"git@github.com:yukimiowo/twitterlike_app.git","clone_url":"https://github.com/yukimiowo/twitterlike_app.git","svn_url":"https://github.com/yukimiowo/twitterlike_app","homepage":null,"size":51,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":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/yukimiowo/twitterlike_app/pulls/1"},"html":{"href":"https://github.com/yukimiowo/twitterlike_app/pull/1"},"issue":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/1"},"comments":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/yukimiowo/twitterlike_app/statuses/f4d256beb6eda9e8549f3f926c96cf320ccb1f86"}}}}
{"actor":{"display_login":"neoknight8"}}