{"action":"created","comment":{"url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/comments/224713245","pull_request_review_id":164148291,"id":224713245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDcxMzI0NQ==","diff_hunk":"@@ -0,0 +1,72 @@\n+class UsersController < ApplicationController\n+  skip_before_action :verify_authenticity_token\n+  \n+  def new\n+    @user = User.new\n+    render json: {user: @user}, status: :ok \n+  end\n+\n+  def create\n+  \tbegin\n+  \t  @user = User.new(user_params)\n+      if @user.save\n+        render json: {user: @user}, status: :ok\n+      else\n+        render json: {errors: @user.errors}, status: :unprocessable_entity\n+      end\n+  \trescue ActiveRecord::InvalidForeignKey => e\n+  \t  render json: {error: 'Invalid Foreign Key'}, status: :unprocessable_entity\n+  \tend   \n+  end\n+\n+  def show\n+    begin\n+      @user = User.find(params[:id])\n+      render json: {user: @user}, status: :ok\n+    rescue ActiveRecord::RecordNotFound => e \n+      render json: {errors: e.message}, status: :not_found\n+    end\n+  end\n+  \n+  def destroy\n+    begin\n+      @user = User.find(params[:id])\n+        @user.destroy\n+        render json: {}, status: :ok \n+    rescue ActiveRecord::RecordNotFound => e\n+      render json: {error:e.message}, status: :unprocessable_entity \n+    end\n+  end\n+\n+  def index\n+    @users = User.all\n+    render json: {users:@users}, status: :ok \n+  end\n+\n+  def edit\n+    begin\n+      @user = User.find(params[:id])\n+      render json: {user:@user}, status: :ok \n+    rescue ActiveRecord::RecordNotFound => e\n+      render json: {error:e.message}, status: :not_found\n+    end\n+  end\n+\n+  def update\n+    begin\n+      @user = User.find(params[:id])\n+      if @user.update(user_params)\n+        render json: {user: @user}, status: :ok \n+      else\n+        render json: @user.errors, status: :unprocessable_entity \n+      end\n+    rescue => e\n+      render json: {error:e.message}, status: :unprocessable_entity \n+    end\n+  end\n+    \n+\tprivate","path":"app/controllers/users_controller.rb","position":68,"original_position":68,"commit_id":"e270523796534ed81aabcd72950afed6180dd99a","original_commit_id":"e270523796534ed81aabcd72950afed6180dd99a","user":{"login":"ankitsahitya","id":35130230,"node_id":"MDQ6VXNlcjM1MTMwMjMw","avatar_url":"https://avatars2.githubusercontent.com/u/35130230?v=4","gravatar_id":"","url":"https://api.github.com/users/ankitsahitya","html_url":"https://github.com/ankitsahitya","followers_url":"https://api.github.com/users/ankitsahitya/followers","following_url":"https://api.github.com/users/ankitsahitya/following{/other_user}","gists_url":"https://api.github.com/users/ankitsahitya/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitsahitya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitsahitya/subscriptions","organizations_url":"https://api.github.com/users/ankitsahitya/orgs","repos_url":"https://api.github.com/users/ankitsahitya/repos","events_url":"https://api.github.com/users/ankitsahitya/events{/privacy}","received_events_url":"https://api.github.com/users/ankitsahitya/received_events","type":"User","site_admin":false},"body":"incorrect indentation","created_at":"2018-10-12T08:46:19Z","updated_at":"2018-10-12T08:46:27Z","html_url":"https://github.com/sanjay12Rathore556/banking_app/pull/4#discussion_r224713245","pull_request_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/comments/224713245"},"html":{"href":"https://github.com/sanjay12Rathore556/banking_app/pull/4#discussion_r224713245"},"pull_request":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4","id":222270438,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMjcwNDM4","html_url":"https://github.com/sanjay12Rathore556/banking_app/pull/4","diff_url":"https://github.com/sanjay12Rathore556/banking_app/pull/4.diff","patch_url":"https://github.com/sanjay12Rathore556/banking_app/pull/4.patch","issue_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/4","number":4,"state":"open","locked":false,"title":"Controller","user":{"login":"sanjay12Rathore556","id":35648538,"node_id":"MDQ6VXNlcjM1NjQ4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/35648538?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjay12Rathore556","html_url":"https://github.com/sanjay12Rathore556","followers_url":"https://api.github.com/users/sanjay12Rathore556/followers","following_url":"https://api.github.com/users/sanjay12Rathore556/following{/other_user}","gists_url":"https://api.github.com/users/sanjay12Rathore556/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay12Rathore556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay12Rathore556/subscriptions","organizations_url":"https://api.github.com/users/sanjay12Rathore556/orgs","repos_url":"https://api.github.com/users/sanjay12Rathore556/repos","events_url":"https://api.github.com/users/sanjay12Rathore556/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay12Rathore556/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-11T20:32:55Z","updated_at":"2018-10-12T08:46:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9303b598bd89690fa7bb6f0f06f7541ce87061be","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4/commits","review_comments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4/comments","review_comment_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/4/comments","statuses_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/statuses/e270523796534ed81aabcd72950afed6180dd99a","head":{"label":"sanjay12Rathore556:controller","ref":"controller","sha":"e270523796534ed81aabcd72950afed6180dd99a","user":{"login":"sanjay12Rathore556","id":35648538,"node_id":"MDQ6VXNlcjM1NjQ4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/35648538?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjay12Rathore556","html_url":"https://github.com/sanjay12Rathore556","followers_url":"https://api.github.com/users/sanjay12Rathore556/followers","following_url":"https://api.github.com/users/sanjay12Rathore556/following{/other_user}","gists_url":"https://api.github.com/users/sanjay12Rathore556/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay12Rathore556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay12Rathore556/subscriptions","organizations_url":"https://api.github.com/users/sanjay12Rathore556/orgs","repos_url":"https://api.github.com/users/sanjay12Rathore556/repos","events_url":"https://api.github.com/users/sanjay12Rathore556/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay12Rathore556/received_events","type":"User","site_admin":false},"repo":{"id":151624527,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE2MjQ1Mjc=","name":"banking_app","full_name":"sanjay12Rathore556/banking_app","private":false,"owner":{"login":"sanjay12Rathore556","id":35648538,"node_id":"MDQ6VXNlcjM1NjQ4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/35648538?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjay12Rathore556","html_url":"https://github.com/sanjay12Rathore556","followers_url":"https://api.github.com/users/sanjay12Rathore556/followers","following_url":"https://api.github.com/users/sanjay12Rathore556/following{/other_user}","gists_url":"https://api.github.com/users/sanjay12Rathore556/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay12Rathore556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay12Rathore556/subscriptions","organizations_url":"https://api.github.com/users/sanjay12Rathore556/orgs","repos_url":"https://api.github.com/users/sanjay12Rathore556/repos","events_url":"https://api.github.com/users/sanjay12Rathore556/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay12Rathore556/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sanjay12Rathore556/banking_app","description":null,"fork":false,"url":"https://api.github.com/repos/sanjay12Rathore556/banking_app","forks_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/forks","keys_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/teams","hooks_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/hooks","issue_events_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/events{/number}","events_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/events","assignees_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/assignees{/user}","branches_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/branches{/branch}","tags_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/tags","blobs_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/languages","stargazers_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/stargazers","contributors_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/contributors","subscribers_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/subscribers","subscription_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/subscription","commits_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/contents/{+path}","compare_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/merges","archive_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/downloads","issues_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues{/number}","pulls_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/labels{/name}","releases_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/releases{/id}","deployments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/deployments","created_at":"2018-10-04T19:23:27Z","updated_at":"2018-10-05T11:04:45Z","pushed_at":"2018-10-12T07:59:19Z","git_url":"git://github.com/sanjay12Rathore556/banking_app.git","ssh_url":"git@github.com:sanjay12Rathore556/banking_app.git","clone_url":"https://github.com/sanjay12Rathore556/banking_app.git","svn_url":"https://github.com/sanjay12Rathore556/banking_app","homepage":null,"size":45,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sanjay12Rathore556:master","ref":"master","sha":"89dca307bb99816c14ca2271f8a25b6926a2de76","user":{"login":"sanjay12Rathore556","id":35648538,"node_id":"MDQ6VXNlcjM1NjQ4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/35648538?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjay12Rathore556","html_url":"https://github.com/sanjay12Rathore556","followers_url":"https://api.github.com/users/sanjay12Rathore556/followers","following_url":"https://api.github.com/users/sanjay12Rathore556/following{/other_user}","gists_url":"https://api.github.com/users/sanjay12Rathore556/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay12Rathore556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay12Rathore556/subscriptions","organizations_url":"https://api.github.com/users/sanjay12Rathore556/orgs","repos_url":"https://api.github.com/users/sanjay12Rathore556/repos","events_url":"https://api.github.com/users/sanjay12Rathore556/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay12Rathore556/received_events","type":"User","site_admin":false},"repo":{"id":151624527,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE2MjQ1Mjc=","name":"banking_app","full_name":"sanjay12Rathore556/banking_app","private":false,"owner":{"login":"sanjay12Rathore556","id":35648538,"node_id":"MDQ6VXNlcjM1NjQ4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/35648538?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjay12Rathore556","html_url":"https://github.com/sanjay12Rathore556","followers_url":"https://api.github.com/users/sanjay12Rathore556/followers","following_url":"https://api.github.com/users/sanjay12Rathore556/following{/other_user}","gists_url":"https://api.github.com/users/sanjay12Rathore556/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjay12Rathore556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjay12Rathore556/subscriptions","organizations_url":"https://api.github.com/users/sanjay12Rathore556/orgs","repos_url":"https://api.github.com/users/sanjay12Rathore556/repos","events_url":"https://api.github.com/users/sanjay12Rathore556/events{/privacy}","received_events_url":"https://api.github.com/users/sanjay12Rathore556/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sanjay12Rathore556/banking_app","description":null,"fork":false,"url":"https://api.github.com/repos/sanjay12Rathore556/banking_app","forks_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/forks","keys_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/teams","hooks_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/hooks","issue_events_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/events{/number}","events_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/events","assignees_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/assignees{/user}","branches_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/branches{/branch}","tags_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/tags","blobs_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/languages","stargazers_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/stargazers","contributors_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/contributors","subscribers_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/subscribers","subscription_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/subscription","commits_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/contents/{+path}","compare_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/merges","archive_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/downloads","issues_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues{/number}","pulls_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/labels{/name}","releases_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/releases{/id}","deployments_url":"https://api.github.com/repos/sanjay12Rathore556/banking_app/deployments","created_at":"2018-10-04T19:23:27Z","updated_at":"2018-10-05T11:04:45Z","pushed_at":"2018-10-12T07:59:19Z","git_url":"git://github.com/sanjay12Rathore556/banking_app.git","ssh_url":"git@github.com:sanjay12Rathore556/banking_app.git","clone_url":"https://github.com/sanjay12Rathore556/banking_app.git","svn_url":"https://github.com/sanjay12Rathore556/banking_app","homepage":null,"size":45,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4"},"html":{"href":"https://github.com/sanjay12Rathore556/banking_app/pull/4"},"issue":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/4"},"comments":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/sanjay12Rathore556/banking_app/statuses/e270523796534ed81aabcd72950afed6180dd99a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ankitsahitya"}}