{"action":"created","comment":{"url":"https://api.github.com/repos/ndoit/fenrir/pulls/comments/243431160","pull_request_review_id":187202098,"id":243431160,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzQzMTE2MA==","diff_hunk":"@@ -93,10 +90,31 @@ def access_type_for(action)\n     end\n   end\n \n+  def set_model; end # overwrite in subclass\n+\n+  def find_model_by_params(model_class)\n+    if params.key?(:id)\n+      @model = model_class.find_by(uuid: params[:id])\n+      raise ActionController::RoutingError.new(\n+        \"#{model_class.to_s.titleize} not found: #{params[:id]}\"\n+      ) if @model.nil?\n+    elsif params.key?(:permalink) && model_class.method_defined?(:permalink)\n+      @model = model_class.find_by_permalink(params[:permalink])\n+      raise ActionController::RoutingError.new(\n+        \"#{model_class.to_s.titleize} not found: #{params[:permalink]}\"\n+      ) if @model.nil?\n+    else\n+      @model = model_class\n+    end\n+    check_access params[:action]\n+  end\n+\n   def check_access(action)\n     access_type = access_type_for(action)\n     return if %i[none self_enforced].include?(access_type)\n-    raise \"Action #{action} failed to set @model.\" unless @model\n+    raise StandardError.new(","path":"app/controllers/application_controller.rb","position":43,"original_position":43,"commit_id":"89a6d78ea770178d0d6a0cd2d47427f197a2e93d","original_commit_id":"89a6d78ea770178d0d6a0cd2d47427f197a2e93d","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Style/MultilineIfModifier: Favor a normal unless-statement over a modifier clause in a multiline statement.","created_at":"2018-12-20T22:00:14Z","updated_at":"2018-12-20T22:00:14Z","html_url":"https://github.com/ndoit/fenrir/pull/897#discussion_r243431160","pull_request_url":"https://api.github.com/repos/ndoit/fenrir/pulls/897","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/comments/243431160"},"html":{"href":"https://github.com/ndoit/fenrir/pull/897#discussion_r243431160"},"pull_request":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/897"}}},"pull_request":{"url":"https://api.github.com/repos/ndoit/fenrir/pulls/897","id":240261782,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjYxNzgy","html_url":"https://github.com/ndoit/fenrir/pull/897","diff_url":"https://github.com/ndoit/fenrir/pull/897.diff","patch_url":"https://github.com/ndoit/fenrir/pull/897.patch","issue_url":"https://api.github.com/repos/ndoit/fenrir/issues/897","number":897,"state":"open","locked":false,"title":"Post deploy fixes","user":{"login":"EvanGranthamBrown","id":4096134,"node_id":"MDQ6VXNlcjQwOTYxMzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4096134?v=4","gravatar_id":"","url":"https://api.github.com/users/EvanGranthamBrown","html_url":"https://github.com/EvanGranthamBrown","followers_url":"https://api.github.com/users/EvanGranthamBrown/followers","following_url":"https://api.github.com/users/EvanGranthamBrown/following{/other_user}","gists_url":"https://api.github.com/users/EvanGranthamBrown/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanGranthamBrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanGranthamBrown/subscriptions","organizations_url":"https://api.github.com/users/EvanGranthamBrown/orgs","repos_url":"https://api.github.com/users/EvanGranthamBrown/repos","events_url":"https://api.github.com/users/EvanGranthamBrown/events{/privacy}","received_events_url":"https://api.github.com/users/EvanGranthamBrown/received_events","type":"User","site_admin":false},"body":"- Cleaned up controller code.\r\n- Got the custom error pages working again.\r\n- If a user tries to enter a \"permalink URL\" with spaces in the URL, the spaces are automatically deleted before evaluating the permalink. (Thus, a lot of old permalinks that broke when we deployed the new version will start working again.)","created_at":"2018-12-20T18:25:17Z","updated_at":"2018-12-20T22:00:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f93097ed07c13df69407b500c1fbb5abc07b7bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ndoit/fenrir/pulls/897/commits","review_comments_url":"https://api.github.com/repos/ndoit/fenrir/pulls/897/comments","review_comment_url":"https://api.github.com/repos/ndoit/fenrir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ndoit/fenrir/issues/897/comments","statuses_url":"https://api.github.com/repos/ndoit/fenrir/statuses/89a6d78ea770178d0d6a0cd2d47427f197a2e93d","head":{"label":"ndoit:post-deploy-fixes","ref":"post-deploy-fixes","sha":"89a6d78ea770178d0d6a0cd2d47427f197a2e93d","user":{"login":"ndoit","id":6223716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjM3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6223716?v=4","gravatar_id":"","url":"https://api.github.com/users/ndoit","html_url":"https://github.com/ndoit","followers_url":"https://api.github.com/users/ndoit/followers","following_url":"https://api.github.com/users/ndoit/following{/other_user}","gists_url":"https://api.github.com/users/ndoit/gists{/gist_id}","starred_url":"https://api.github.com/users/ndoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndoit/subscriptions","organizations_url":"https://api.github.com/users/ndoit/orgs","repos_url":"https://api.github.com/users/ndoit/repos","events_url":"https://api.github.com/users/ndoit/events{/privacy}","received_events_url":"https://api.github.com/users/ndoit/received_events","type":"Organization","site_admin":false},"repo":{"id":39837938,"node_id":"MDEwOlJlcG9zaXRvcnkzOTgzNzkzOA==","name":"fenrir","full_name":"ndoit/fenrir","private":false,"owner":{"login":"ndoit","id":6223716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjM3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6223716?v=4","gravatar_id":"","url":"https://api.github.com/users/ndoit","html_url":"https://github.com/ndoit","followers_url":"https://api.github.com/users/ndoit/followers","following_url":"https://api.github.com/users/ndoit/following{/other_user}","gists_url":"https://api.github.com/users/ndoit/gists{/gist_id}","starred_url":"https://api.github.com/users/ndoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndoit/subscriptions","organizations_url":"https://api.github.com/users/ndoit/orgs","repos_url":"https://api.github.com/users/ndoit/repos","events_url":"https://api.github.com/users/ndoit/events{/privacy}","received_events_url":"https://api.github.com/users/ndoit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ndoit/fenrir","description":"BI Portal","fork":false,"url":"https://api.github.com/repos/ndoit/fenrir","forks_url":"https://api.github.com/repos/ndoit/fenrir/forks","keys_url":"https://api.github.com/repos/ndoit/fenrir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndoit/fenrir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndoit/fenrir/teams","hooks_url":"https://api.github.com/repos/ndoit/fenrir/hooks","issue_events_url":"https://api.github.com/repos/ndoit/fenrir/issues/events{/number}","events_url":"https://api.github.com/repos/ndoit/fenrir/events","assignees_url":"https://api.github.com/repos/ndoit/fenrir/assignees{/user}","branches_url":"https://api.github.com/repos/ndoit/fenrir/branches{/branch}","tags_url":"https://api.github.com/repos/ndoit/fenrir/tags","blobs_url":"https://api.github.com/repos/ndoit/fenrir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndoit/fenrir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndoit/fenrir/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndoit/fenrir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndoit/fenrir/statuses/{sha}","languages_url":"https://api.github.com/repos/ndoit/fenrir/languages","stargazers_url":"https://api.github.com/repos/ndoit/fenrir/stargazers","contributors_url":"https://api.github.com/repos/ndoit/fenrir/contributors","subscribers_url":"https://api.github.com/repos/ndoit/fenrir/subscribers","subscription_url":"https://api.github.com/repos/ndoit/fenrir/subscription","commits_url":"https://api.github.com/repos/ndoit/fenrir/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndoit/fenrir/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndoit/fenrir/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndoit/fenrir/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndoit/fenrir/contents/{+path}","compare_url":"https://api.github.com/repos/ndoit/fenrir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndoit/fenrir/merges","archive_url":"https://api.github.com/repos/ndoit/fenrir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndoit/fenrir/downloads","issues_url":"https://api.github.com/repos/ndoit/fenrir/issues{/number}","pulls_url":"https://api.github.com/repos/ndoit/fenrir/pulls{/number}","milestones_url":"https://api.github.com/repos/ndoit/fenrir/milestones{/number}","notifications_url":"https://api.github.com/repos/ndoit/fenrir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndoit/fenrir/labels{/name}","releases_url":"https://api.github.com/repos/ndoit/fenrir/releases{/id}","deployments_url":"https://api.github.com/repos/ndoit/fenrir/deployments","created_at":"2015-07-28T14:14:01Z","updated_at":"2018-12-18T19:18:28Z","pushed_at":"2018-12-20T21:59:48Z","git_url":"git://github.com/ndoit/fenrir.git","ssh_url":"git@github.com:ndoit/fenrir.git","clone_url":"https://github.com/ndoit/fenrir.git","svn_url":"https://github.com/ndoit/fenrir","homepage":"https://data.nd.edu","size":33400,"stargazers_count":6,"watchers_count":6,"language":"CSS","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":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":28,"watchers":6,"default_branch":"master"}},"base":{"label":"ndoit:ui-admin-changes","ref":"ui-admin-changes","sha":"a53a0e2b345d17185709c4b8de0c20654de9b34d","user":{"login":"ndoit","id":6223716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjM3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6223716?v=4","gravatar_id":"","url":"https://api.github.com/users/ndoit","html_url":"https://github.com/ndoit","followers_url":"https://api.github.com/users/ndoit/followers","following_url":"https://api.github.com/users/ndoit/following{/other_user}","gists_url":"https://api.github.com/users/ndoit/gists{/gist_id}","starred_url":"https://api.github.com/users/ndoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndoit/subscriptions","organizations_url":"https://api.github.com/users/ndoit/orgs","repos_url":"https://api.github.com/users/ndoit/repos","events_url":"https://api.github.com/users/ndoit/events{/privacy}","received_events_url":"https://api.github.com/users/ndoit/received_events","type":"Organization","site_admin":false},"repo":{"id":39837938,"node_id":"MDEwOlJlcG9zaXRvcnkzOTgzNzkzOA==","name":"fenrir","full_name":"ndoit/fenrir","private":false,"owner":{"login":"ndoit","id":6223716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjM3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6223716?v=4","gravatar_id":"","url":"https://api.github.com/users/ndoit","html_url":"https://github.com/ndoit","followers_url":"https://api.github.com/users/ndoit/followers","following_url":"https://api.github.com/users/ndoit/following{/other_user}","gists_url":"https://api.github.com/users/ndoit/gists{/gist_id}","starred_url":"https://api.github.com/users/ndoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndoit/subscriptions","organizations_url":"https://api.github.com/users/ndoit/orgs","repos_url":"https://api.github.com/users/ndoit/repos","events_url":"https://api.github.com/users/ndoit/events{/privacy}","received_events_url":"https://api.github.com/users/ndoit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ndoit/fenrir","description":"BI Portal","fork":false,"url":"https://api.github.com/repos/ndoit/fenrir","forks_url":"https://api.github.com/repos/ndoit/fenrir/forks","keys_url":"https://api.github.com/repos/ndoit/fenrir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndoit/fenrir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndoit/fenrir/teams","hooks_url":"https://api.github.com/repos/ndoit/fenrir/hooks","issue_events_url":"https://api.github.com/repos/ndoit/fenrir/issues/events{/number}","events_url":"https://api.github.com/repos/ndoit/fenrir/events","assignees_url":"https://api.github.com/repos/ndoit/fenrir/assignees{/user}","branches_url":"https://api.github.com/repos/ndoit/fenrir/branches{/branch}","tags_url":"https://api.github.com/repos/ndoit/fenrir/tags","blobs_url":"https://api.github.com/repos/ndoit/fenrir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndoit/fenrir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndoit/fenrir/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndoit/fenrir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndoit/fenrir/statuses/{sha}","languages_url":"https://api.github.com/repos/ndoit/fenrir/languages","stargazers_url":"https://api.github.com/repos/ndoit/fenrir/stargazers","contributors_url":"https://api.github.com/repos/ndoit/fenrir/contributors","subscribers_url":"https://api.github.com/repos/ndoit/fenrir/subscribers","subscription_url":"https://api.github.com/repos/ndoit/fenrir/subscription","commits_url":"https://api.github.com/repos/ndoit/fenrir/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndoit/fenrir/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndoit/fenrir/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndoit/fenrir/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndoit/fenrir/contents/{+path}","compare_url":"https://api.github.com/repos/ndoit/fenrir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndoit/fenrir/merges","archive_url":"https://api.github.com/repos/ndoit/fenrir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndoit/fenrir/downloads","issues_url":"https://api.github.com/repos/ndoit/fenrir/issues{/number}","pulls_url":"https://api.github.com/repos/ndoit/fenrir/pulls{/number}","milestones_url":"https://api.github.com/repos/ndoit/fenrir/milestones{/number}","notifications_url":"https://api.github.com/repos/ndoit/fenrir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndoit/fenrir/labels{/name}","releases_url":"https://api.github.com/repos/ndoit/fenrir/releases{/id}","deployments_url":"https://api.github.com/repos/ndoit/fenrir/deployments","created_at":"2015-07-28T14:14:01Z","updated_at":"2018-12-18T19:18:28Z","pushed_at":"2018-12-20T21:59:48Z","git_url":"git://github.com/ndoit/fenrir.git","ssh_url":"git@github.com:ndoit/fenrir.git","clone_url":"https://github.com/ndoit/fenrir.git","svn_url":"https://github.com/ndoit/fenrir","homepage":"https://data.nd.edu","size":33400,"stargazers_count":6,"watchers_count":6,"language":"CSS","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":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":28,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/897"},"html":{"href":"https://github.com/ndoit/fenrir/pull/897"},"issue":{"href":"https://api.github.com/repos/ndoit/fenrir/issues/897"},"comments":{"href":"https://api.github.com/repos/ndoit/fenrir/issues/897/comments"},"review_comments":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/897/comments"},"review_comment":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ndoit/fenrir/pulls/897/commits"},"statuses":{"href":"https://api.github.com/repos/ndoit/fenrir/statuses/89a6d78ea770178d0d6a0cd2d47427f197a2e93d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}