{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/caesar/pulls/comments/208912241","pull_request_review_id":144785967,"id":208912241,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODkxMjI0MQ==","diff_hunk":"@@ -0,0 +1,72 @@\n+class SubjectRulesController < ApplicationController\n+  def index\n+    authorize workflow\n+\n+    rules = SubjectRule.where(workflow_id: params[:workflow_id])\n+    respond_to do |format|\n+      format.html { redirect_to workflow }\n+      format.json { render json: rules }\n+    end\n+  end\n+\n+  def show\n+    authorize workflow\n+    @rule = workflow.subject_rules.find(params[:id]) or not_found","path":"app/controllers/subject_rules_controller.rb","position":14,"original_position":14,"commit_id":"b119770535942863b5cf802ec3f882d111307a96","original_commit_id":"b119770535942863b5cf802ec3f882d111307a96","user":{"login":"marten","id":277,"node_id":"MDQ6VXNlcjI3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/277?v=4","gravatar_id":"","url":"https://api.github.com/users/marten","html_url":"https://github.com/marten","followers_url":"https://api.github.com/users/marten/followers","following_url":"https://api.github.com/users/marten/following{/other_user}","gists_url":"https://api.github.com/users/marten/gists{/gist_id}","starred_url":"https://api.github.com/users/marten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marten/subscriptions","organizations_url":"https://api.github.com/users/marten/orgs","repos_url":"https://api.github.com/users/marten/repos","events_url":"https://api.github.com/users/marten/events{/privacy}","received_events_url":"https://api.github.com/users/marten/received_events","type":"User","site_admin":false},"body":"Did you TDD the addition of `or not_found`? If I remove it, I get no test failures, and I'm fairly sure that it's unreachable code since Rails would raise `RecordNotFound`. This in turn is handled by the ApplicationController, which is why you are seeing a 404. Since `or` tends to bite, and it doesn't have any effect here, perhaps these could just be removed everywhere? (I won't mark all of them)","created_at":"2018-08-09T12:37:27Z","updated_at":"2018-08-09T12:48:46Z","html_url":"https://github.com/zooniverse/caesar/pull/380#discussion_r208912241","pull_request_url":"https://api.github.com/repos/zooniverse/caesar/pulls/380","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/comments/208912241"},"html":{"href":"https://github.com/zooniverse/caesar/pull/380#discussion_r208912241"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/caesar/pulls/380","id":207133739,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTMzNzM5","html_url":"https://github.com/zooniverse/caesar/pull/380","diff_url":"https://github.com/zooniverse/caesar/pull/380.diff","patch_url":"https://github.com/zooniverse/caesar/pull/380.patch","issue_url":"https://api.github.com/repos/zooniverse/caesar/issues/380","number":380,"state":"open","locked":false,"title":"UI Revamp 1/n: Add controllers","user":{"login":"amyrebecca","id":8491638,"node_id":"MDQ6VXNlcjg0OTE2Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/8491638?v=4","gravatar_id":"","url":"https://api.github.com/users/amyrebecca","html_url":"https://github.com/amyrebecca","followers_url":"https://api.github.com/users/amyrebecca/followers","following_url":"https://api.github.com/users/amyrebecca/following{/other_user}","gists_url":"https://api.github.com/users/amyrebecca/gists{/gist_id}","starred_url":"https://api.github.com/users/amyrebecca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyrebecca/subscriptions","organizations_url":"https://api.github.com/users/amyrebecca/orgs","repos_url":"https://api.github.com/users/amyrebecca/repos","events_url":"https://api.github.com/users/amyrebecca/events{/privacy}","received_events_url":"https://api.github.com/users/amyrebecca/received_events","type":"User","site_admin":false},"body":"Add controllers for subject rules, user rules, subject rule effects, and user rule effects.","created_at":"2018-08-08T20:51:01Z","updated_at":"2018-08-09T12:48:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"528b490d9b8c5f44031ea048889aa2ed4b01a01a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"zwolf","id":374835,"node_id":"MDQ6VXNlcjM3NDgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/374835?v=4","gravatar_id":"","url":"https://api.github.com/users/zwolf","html_url":"https://github.com/zwolf","followers_url":"https://api.github.com/users/zwolf/followers","following_url":"https://api.github.com/users/zwolf/following{/other_user}","gists_url":"https://api.github.com/users/zwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/zwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwolf/subscriptions","organizations_url":"https://api.github.com/users/zwolf/orgs","repos_url":"https://api.github.com/users/zwolf/repos","events_url":"https://api.github.com/users/zwolf/events{/privacy}","received_events_url":"https://api.github.com/users/zwolf/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/caesar/pulls/380/commits","review_comments_url":"https://api.github.com/repos/zooniverse/caesar/pulls/380/comments","review_comment_url":"https://api.github.com/repos/zooniverse/caesar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/caesar/issues/380/comments","statuses_url":"https://api.github.com/repos/zooniverse/caesar/statuses/b119770535942863b5cf802ec3f882d111307a96","head":{"label":"amyrebecca:rules-controllers","ref":"rules-controllers","sha":"b119770535942863b5cf802ec3f882d111307a96","user":{"login":"amyrebecca","id":8491638,"node_id":"MDQ6VXNlcjg0OTE2Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/8491638?v=4","gravatar_id":"","url":"https://api.github.com/users/amyrebecca","html_url":"https://github.com/amyrebecca","followers_url":"https://api.github.com/users/amyrebecca/followers","following_url":"https://api.github.com/users/amyrebecca/following{/other_user}","gists_url":"https://api.github.com/users/amyrebecca/gists{/gist_id}","starred_url":"https://api.github.com/users/amyrebecca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyrebecca/subscriptions","organizations_url":"https://api.github.com/users/amyrebecca/orgs","repos_url":"https://api.github.com/users/amyrebecca/repos","events_url":"https://api.github.com/users/amyrebecca/events{/privacy}","received_events_url":"https://api.github.com/users/amyrebecca/received_events","type":"User","site_admin":false},"repo":{"id":81078953,"node_id":"MDEwOlJlcG9zaXRvcnk4MTA3ODk1Mw==","name":"caesar","full_name":"amyrebecca/caesar","owner":{"login":"amyrebecca","id":8491638,"node_id":"MDQ6VXNlcjg0OTE2Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/8491638?v=4","gravatar_id":"","url":"https://api.github.com/users/amyrebecca","html_url":"https://github.com/amyrebecca","followers_url":"https://api.github.com/users/amyrebecca/followers","following_url":"https://api.github.com/users/amyrebecca/following{/other_user}","gists_url":"https://api.github.com/users/amyrebecca/gists{/gist_id}","starred_url":"https://api.github.com/users/amyrebecca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyrebecca/subscriptions","organizations_url":"https://api.github.com/users/amyrebecca/orgs","repos_url":"https://api.github.com/users/amyrebecca/repos","events_url":"https://api.github.com/users/amyrebecca/events{/privacy}","received_events_url":"https://api.github.com/users/amyrebecca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amyrebecca/caesar","description":null,"fork":true,"url":"https://api.github.com/repos/amyrebecca/caesar","forks_url":"https://api.github.com/repos/amyrebecca/caesar/forks","keys_url":"https://api.github.com/repos/amyrebecca/caesar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amyrebecca/caesar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amyrebecca/caesar/teams","hooks_url":"https://api.github.com/repos/amyrebecca/caesar/hooks","issue_events_url":"https://api.github.com/repos/amyrebecca/caesar/issues/events{/number}","events_url":"https://api.github.com/repos/amyrebecca/caesar/events","assignees_url":"https://api.github.com/repos/amyrebecca/caesar/assignees{/user}","branches_url":"https://api.github.com/repos/amyrebecca/caesar/branches{/branch}","tags_url":"https://api.github.com/repos/amyrebecca/caesar/tags","blobs_url":"https://api.github.com/repos/amyrebecca/caesar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amyrebecca/caesar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amyrebecca/caesar/git/refs{/sha}","trees_url":"https://api.github.com/repos/amyrebecca/caesar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amyrebecca/caesar/statuses/{sha}","languages_url":"https://api.github.com/repos/amyrebecca/caesar/languages","stargazers_url":"https://api.github.com/repos/amyrebecca/caesar/stargazers","contributors_url":"https://api.github.com/repos/amyrebecca/caesar/contributors","subscribers_url":"https://api.github.com/repos/amyrebecca/caesar/subscribers","subscription_url":"https://api.github.com/repos/amyrebecca/caesar/subscription","commits_url":"https://api.github.com/repos/amyrebecca/caesar/commits{/sha}","git_commits_url":"https://api.github.com/repos/amyrebecca/caesar/git/commits{/sha}","comments_url":"https://api.github.com/repos/amyrebecca/caesar/comments{/number}","issue_comment_url":"https://api.github.com/repos/amyrebecca/caesar/issues/comments{/number}","contents_url":"https://api.github.com/repos/amyrebecca/caesar/contents/{+path}","compare_url":"https://api.github.com/repos/amyrebecca/caesar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amyrebecca/caesar/merges","archive_url":"https://api.github.com/repos/amyrebecca/caesar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amyrebecca/caesar/downloads","issues_url":"https://api.github.com/repos/amyrebecca/caesar/issues{/number}","pulls_url":"https://api.github.com/repos/amyrebecca/caesar/pulls{/number}","milestones_url":"https://api.github.com/repos/amyrebecca/caesar/milestones{/number}","notifications_url":"https://api.github.com/repos/amyrebecca/caesar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amyrebecca/caesar/labels{/name}","releases_url":"https://api.github.com/repos/amyrebecca/caesar/releases{/id}","deployments_url":"https://api.github.com/repos/amyrebecca/caesar/deployments","created_at":"2017-02-06T11:10:02Z","updated_at":"2018-06-25T15:54:04Z","pushed_at":"2018-08-09T11:18:24Z","git_url":"git://github.com/amyrebecca/caesar.git","ssh_url":"git@github.com:amyrebecca/caesar.git","clone_url":"https://github.com/amyrebecca/caesar.git","svn_url":"https://github.com/amyrebecca/caesar","homepage":null,"size":1153,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zooniverse:seed-file","ref":"seed-file","sha":"6f3051e76de2a82e996825d1649a0e9829167683","user":{"login":"zooniverse","id":106856,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjg1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":78732666,"node_id":"MDEwOlJlcG9zaXRvcnk3ODczMjY2Ng==","name":"caesar","full_name":"zooniverse/caesar","owner":{"login":"zooniverse","id":106856,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjg1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/caesar","description":null,"fork":false,"url":"https://api.github.com/repos/zooniverse/caesar","forks_url":"https://api.github.com/repos/zooniverse/caesar/forks","keys_url":"https://api.github.com/repos/zooniverse/caesar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/caesar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/caesar/teams","hooks_url":"https://api.github.com/repos/zooniverse/caesar/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/caesar/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/caesar/events","assignees_url":"https://api.github.com/repos/zooniverse/caesar/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/caesar/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/caesar/tags","blobs_url":"https://api.github.com/repos/zooniverse/caesar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/caesar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/caesar/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/caesar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/caesar/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/caesar/languages","stargazers_url":"https://api.github.com/repos/zooniverse/caesar/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/caesar/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/caesar/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/caesar/subscription","commits_url":"https://api.github.com/repos/zooniverse/caesar/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/caesar/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/caesar/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/caesar/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/caesar/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/caesar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/caesar/merges","archive_url":"https://api.github.com/repos/zooniverse/caesar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/caesar/downloads","issues_url":"https://api.github.com/repos/zooniverse/caesar/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/caesar/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/caesar/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/caesar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/caesar/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/caesar/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/caesar/deployments","created_at":"2017-01-12T10:12:34Z","updated_at":"2018-08-08T19:48:59Z","pushed_at":"2018-08-09T11:18:25Z","git_url":"git://github.com/zooniverse/caesar.git","ssh_url":"git@github.com:zooniverse/caesar.git","clone_url":"https://github.com/zooniverse/caesar.git","svn_url":"https://github.com/zooniverse/caesar","homepage":"https://zooniverse.github.com/caesar","size":1189,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":44,"license":null,"forks":4,"open_issues":44,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/380"},"html":{"href":"https://github.com/zooniverse/caesar/pull/380"},"issue":{"href":"https://api.github.com/repos/zooniverse/caesar/issues/380"},"comments":{"href":"https://api.github.com/repos/zooniverse/caesar/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/caesar/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/caesar/statuses/b119770535942863b5cf802ec3f882d111307a96"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"marten"}}