{"action":"created","comment":{"url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/comments/115127012","pull_request_review_id":36650523,"id":115127012,"diff_hunk":"@@ -0,0 +1,47 @@\n+class Api::V1::RealitiesController < ApplicationController\n+  skip_before_action :verify_authenticity_token\n+\n+  def index\n+    render json: Reality.all\n+  end\n+\n+  def show\n+    # render json: { RealityCheck: RealityCheck.find(show_rc_params), user: current_user }\n+    render json: Reality.find(params[:id])\n+  end\n+  def create\n+    reality = Reality.new(check_params)\n+    category = Category.find(check_params['category_id'])\n+    reality.user = current_user\n+    if reality.save\n+      flash[:notice] = \"Reality added successfully\"\n+      review_to_send = {}\n+      review_to_send[:id] = reality.id\n+      review_to_send[:check] = reality.check\n+      review_to_send[:created_at] = category.created_at\n+      render json: {\n+       status: 201,\n+       message: (\"successfully created a reality!\"),\n+       review: review_to_send\n+      }.to_json\n+    else\n+      flash[:notice] = \"Reality failed to save\"\n+      render json: {\n+        status: 400,\n+        error: category.errors\n+      }.to_json, status: :bad_request\n+    end\n+  end\n+\n+  private\n+\n+  def check_params\n+    params.require(:reality).permit(:id, :user_id, :check, :category_id)\n+  end\n+\n+  def show_rc_params\n+    params.require(:reality).permit(:id)\n+  end\n+\n+","path":"app/controllers/api/v1/realities_controller.rb","position":46,"original_position":46,"commit_id":"21121482e788e550411b1e80c219d5c4885f7bf2","original_commit_id":"21121482e788e550411b1e80c219d5c4885f7bf2","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Extra blank line detected.<br>Extra empty line detected at class body end.","created_at":"2017-05-06T19:15:57Z","updated_at":"2017-05-06T19:15:57Z","html_url":"https://github.com/Philip10023/Reality-Checker/pull/8#discussion_r115127012","pull_request_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/comments/115127012"},"html":{"href":"https://github.com/Philip10023/Reality-Checker/pull/8#discussion_r115127012"},"pull_request":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8","id":119312688,"html_url":"https://github.com/Philip10023/Reality-Checker/pull/8","diff_url":"https://github.com/Philip10023/Reality-Checker/pull/8.diff","patch_url":"https://github.com/Philip10023/Reality-Checker/pull/8.patch","issue_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/8","number":8,"state":"open","locked":false,"title":"more debugging","user":{"login":"Philip10023","id":26091442,"avatar_url":"https://avatars3.githubusercontent.com/u/26091442?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip10023","html_url":"https://github.com/Philip10023","followers_url":"https://api.github.com/users/Philip10023/followers","following_url":"https://api.github.com/users/Philip10023/following{/other_user}","gists_url":"https://api.github.com/users/Philip10023/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip10023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip10023/subscriptions","organizations_url":"https://api.github.com/users/Philip10023/orgs","repos_url":"https://api.github.com/users/Philip10023/repos","events_url":"https://api.github.com/users/Philip10023/events{/privacy}","received_events_url":"https://api.github.com/users/Philip10023/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-06T19:15:41Z","updated_at":"2017-05-06T19:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3020ef65061f8049866a2c37f4213ab81ea4888","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/8/comments","statuses_url":"https://api.github.com/repos/Philip10023/Reality-Checker/statuses/21121482e788e550411b1e80c219d5c4885f7bf2","head":{"label":"Philip10023:external_api","ref":"external_api","sha":"21121482e788e550411b1e80c219d5c4885f7bf2","user":{"login":"Philip10023","id":26091442,"avatar_url":"https://avatars3.githubusercontent.com/u/26091442?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip10023","html_url":"https://github.com/Philip10023","followers_url":"https://api.github.com/users/Philip10023/followers","following_url":"https://api.github.com/users/Philip10023/following{/other_user}","gists_url":"https://api.github.com/users/Philip10023/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip10023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip10023/subscriptions","organizations_url":"https://api.github.com/users/Philip10023/orgs","repos_url":"https://api.github.com/users/Philip10023/repos","events_url":"https://api.github.com/users/Philip10023/events{/privacy}","received_events_url":"https://api.github.com/users/Philip10023/received_events","type":"User","site_admin":false},"repo":{"id":89939406,"name":"Reality-Checker","full_name":"Philip10023/Reality-Checker","owner":{"login":"Philip10023","id":26091442,"avatar_url":"https://avatars3.githubusercontent.com/u/26091442?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip10023","html_url":"https://github.com/Philip10023","followers_url":"https://api.github.com/users/Philip10023/followers","following_url":"https://api.github.com/users/Philip10023/following{/other_user}","gists_url":"https://api.github.com/users/Philip10023/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip10023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip10023/subscriptions","organizations_url":"https://api.github.com/users/Philip10023/orgs","repos_url":"https://api.github.com/users/Philip10023/repos","events_url":"https://api.github.com/users/Philip10023/events{/privacy}","received_events_url":"https://api.github.com/users/Philip10023/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Philip10023/Reality-Checker","description":"to show versatility in react.js and ruby on rails","fork":false,"url":"https://api.github.com/repos/Philip10023/Reality-Checker","forks_url":"https://api.github.com/repos/Philip10023/Reality-Checker/forks","keys_url":"https://api.github.com/repos/Philip10023/Reality-Checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Philip10023/Reality-Checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Philip10023/Reality-Checker/teams","hooks_url":"https://api.github.com/repos/Philip10023/Reality-Checker/hooks","issue_events_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/events{/number}","events_url":"https://api.github.com/repos/Philip10023/Reality-Checker/events","assignees_url":"https://api.github.com/repos/Philip10023/Reality-Checker/assignees{/user}","branches_url":"https://api.github.com/repos/Philip10023/Reality-Checker/branches{/branch}","tags_url":"https://api.github.com/repos/Philip10023/Reality-Checker/tags","blobs_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Philip10023/Reality-Checker/statuses/{sha}","languages_url":"https://api.github.com/repos/Philip10023/Reality-Checker/languages","stargazers_url":"https://api.github.com/repos/Philip10023/Reality-Checker/stargazers","contributors_url":"https://api.github.com/repos/Philip10023/Reality-Checker/contributors","subscribers_url":"https://api.github.com/repos/Philip10023/Reality-Checker/subscribers","subscription_url":"https://api.github.com/repos/Philip10023/Reality-Checker/subscription","commits_url":"https://api.github.com/repos/Philip10023/Reality-Checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Philip10023/Reality-Checker/contents/{+path}","compare_url":"https://api.github.com/repos/Philip10023/Reality-Checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Philip10023/Reality-Checker/merges","archive_url":"https://api.github.com/repos/Philip10023/Reality-Checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Philip10023/Reality-Checker/downloads","issues_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues{/number}","pulls_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls{/number}","milestones_url":"https://api.github.com/repos/Philip10023/Reality-Checker/milestones{/number}","notifications_url":"https://api.github.com/repos/Philip10023/Reality-Checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Philip10023/Reality-Checker/labels{/name}","releases_url":"https://api.github.com/repos/Philip10023/Reality-Checker/releases{/id}","deployments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/deployments","created_at":"2017-05-01T16:08:52Z","updated_at":"2017-05-04T18:54:14Z","pushed_at":"2017-05-06T19:15:41Z","git_url":"git://github.com/Philip10023/Reality-Checker.git","ssh_url":"git@github.com:Philip10023/Reality-Checker.git","clone_url":"https://github.com/Philip10023/Reality-Checker.git","svn_url":"https://github.com/Philip10023/Reality-Checker","homepage":null,"size":28608,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"Philip10023:master","ref":"master","sha":"9507aad1f8cb7b2205a941e018c2f94496951184","user":{"login":"Philip10023","id":26091442,"avatar_url":"https://avatars3.githubusercontent.com/u/26091442?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip10023","html_url":"https://github.com/Philip10023","followers_url":"https://api.github.com/users/Philip10023/followers","following_url":"https://api.github.com/users/Philip10023/following{/other_user}","gists_url":"https://api.github.com/users/Philip10023/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip10023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip10023/subscriptions","organizations_url":"https://api.github.com/users/Philip10023/orgs","repos_url":"https://api.github.com/users/Philip10023/repos","events_url":"https://api.github.com/users/Philip10023/events{/privacy}","received_events_url":"https://api.github.com/users/Philip10023/received_events","type":"User","site_admin":false},"repo":{"id":89939406,"name":"Reality-Checker","full_name":"Philip10023/Reality-Checker","owner":{"login":"Philip10023","id":26091442,"avatar_url":"https://avatars3.githubusercontent.com/u/26091442?v=3","gravatar_id":"","url":"https://api.github.com/users/Philip10023","html_url":"https://github.com/Philip10023","followers_url":"https://api.github.com/users/Philip10023/followers","following_url":"https://api.github.com/users/Philip10023/following{/other_user}","gists_url":"https://api.github.com/users/Philip10023/gists{/gist_id}","starred_url":"https://api.github.com/users/Philip10023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Philip10023/subscriptions","organizations_url":"https://api.github.com/users/Philip10023/orgs","repos_url":"https://api.github.com/users/Philip10023/repos","events_url":"https://api.github.com/users/Philip10023/events{/privacy}","received_events_url":"https://api.github.com/users/Philip10023/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Philip10023/Reality-Checker","description":"to show versatility in react.js and ruby on rails","fork":false,"url":"https://api.github.com/repos/Philip10023/Reality-Checker","forks_url":"https://api.github.com/repos/Philip10023/Reality-Checker/forks","keys_url":"https://api.github.com/repos/Philip10023/Reality-Checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Philip10023/Reality-Checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Philip10023/Reality-Checker/teams","hooks_url":"https://api.github.com/repos/Philip10023/Reality-Checker/hooks","issue_events_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/events{/number}","events_url":"https://api.github.com/repos/Philip10023/Reality-Checker/events","assignees_url":"https://api.github.com/repos/Philip10023/Reality-Checker/assignees{/user}","branches_url":"https://api.github.com/repos/Philip10023/Reality-Checker/branches{/branch}","tags_url":"https://api.github.com/repos/Philip10023/Reality-Checker/tags","blobs_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Philip10023/Reality-Checker/statuses/{sha}","languages_url":"https://api.github.com/repos/Philip10023/Reality-Checker/languages","stargazers_url":"https://api.github.com/repos/Philip10023/Reality-Checker/stargazers","contributors_url":"https://api.github.com/repos/Philip10023/Reality-Checker/contributors","subscribers_url":"https://api.github.com/repos/Philip10023/Reality-Checker/subscribers","subscription_url":"https://api.github.com/repos/Philip10023/Reality-Checker/subscription","commits_url":"https://api.github.com/repos/Philip10023/Reality-Checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Philip10023/Reality-Checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Philip10023/Reality-Checker/contents/{+path}","compare_url":"https://api.github.com/repos/Philip10023/Reality-Checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Philip10023/Reality-Checker/merges","archive_url":"https://api.github.com/repos/Philip10023/Reality-Checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Philip10023/Reality-Checker/downloads","issues_url":"https://api.github.com/repos/Philip10023/Reality-Checker/issues{/number}","pulls_url":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls{/number}","milestones_url":"https://api.github.com/repos/Philip10023/Reality-Checker/milestones{/number}","notifications_url":"https://api.github.com/repos/Philip10023/Reality-Checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Philip10023/Reality-Checker/labels{/name}","releases_url":"https://api.github.com/repos/Philip10023/Reality-Checker/releases{/id}","deployments_url":"https://api.github.com/repos/Philip10023/Reality-Checker/deployments","created_at":"2017-05-01T16:08:52Z","updated_at":"2017-05-04T18:54:14Z","pushed_at":"2017-05-06T19:15:41Z","git_url":"git://github.com/Philip10023/Reality-Checker.git","ssh_url":"git@github.com:Philip10023/Reality-Checker.git","clone_url":"https://github.com/Philip10023/Reality-Checker.git","svn_url":"https://github.com/Philip10023/Reality-Checker","homepage":null,"size":28608,"stargazers_count":0,"watchers_count":0,"language":"CSS","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/Philip10023/Reality-Checker/pulls/8"},"html":{"href":"https://github.com/Philip10023/Reality-Checker/pull/8"},"issue":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/8"},"comments":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Philip10023/Reality-Checker/statuses/21121482e788e550411b1e80c219d5c4885f7bf2"}}}}
{"actor":{"display_login":"houndci-bot"}}