{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/46964055","id":46964055,"diff_hunk":"@@ -381,13 +381,7 @@ def get_content_view_environments(label = nil, organization = nil)\n           where(\"#{Organization.table_name}.id = ?\", organization.id)\n       environments = environments.where(\"#{Katello::ContentViewEnvironment.table_name}.label = ?\", label) if label\n \n-      environments.delete_if do |env|\n-        if env.content_view.default\n-          !env.environment.readable?\n-        else\n-          !env.content_view.readable?\n-        end\n-      end\n+      environments = environments.to_a.delete_if { |env| (env.content_view.default && !env.environment.readable?) || !env.content_view.readable? }","path":"app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb","position":11,"original_position":11,"commit_id":"1d0a51ed0ddcd2ac3e38b4bc2cdd8d030de19749","original_commit_id":"d2611dc163a95afa2a9c822a45160c26627014f8","user":{"login":"cpeters","id":510906,"avatar_url":"https://avatars.githubusercontent.com/u/510906?v=3","gravatar_id":"","url":"https://api.github.com/users/cpeters","html_url":"https://github.com/cpeters","followers_url":"https://api.github.com/users/cpeters/followers","following_url":"https://api.github.com/users/cpeters/following{/other_user}","gists_url":"https://api.github.com/users/cpeters/gists{/gist_id}","starred_url":"https://api.github.com/users/cpeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpeters/subscriptions","organizations_url":"https://api.github.com/users/cpeters/orgs","repos_url":"https://api.github.com/users/cpeters/repos","events_url":"https://api.github.com/users/cpeters/events{/privacy}","received_events_url":"https://api.github.com/users/cpeters/received_events","type":"User","site_admin":false},"body":"@daviddavis I didn't realize that there was no reject! on activerecord relations.\r\n\r\n+1 on reject and not casting.","created_at":"2015-12-08T15:10:03Z","updated_at":"2015-12-08T15:10:03Z","html_url":"https://github.com/Katello/katello/pull/5653#discussion_r46964055","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/5653","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/46964055"},"html":{"href":"https://github.com/Katello/katello/pull/5653#discussion_r46964055"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/5653"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5653","id":52875363,"html_url":"https://github.com/Katello/katello/pull/5653","diff_url":"https://github.com/Katello/katello/pull/5653.diff","patch_url":"https://github.com/Katello/katello/pull/5653.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/5653","number":5653,"state":"open","locked":false,"title":"Refs #10970 - Rails 4 unable to register a content host","user":{"login":"johnpmitsch","id":5964462,"avatar_url":"https://avatars.githubusercontent.com/u/5964462?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpmitsch","html_url":"https://github.com/johnpmitsch","followers_url":"https://api.github.com/users/johnpmitsch/followers","following_url":"https://api.github.com/users/johnpmitsch/following{/other_user}","gists_url":"https://api.github.com/users/johnpmitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpmitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpmitsch/subscriptions","organizations_url":"https://api.github.com/users/johnpmitsch/orgs","repos_url":"https://api.github.com/users/johnpmitsch/repos","events_url":"https://api.github.com/users/johnpmitsch/events{/privacy}","received_events_url":"https://api.github.com/users/johnpmitsch/received_events","type":"User","site_admin":false},"body":"The routes were api/rhsm/* instead of /rhsm/ and could not be found. \r\ndelete_if using a block no longer exists and had to be refactored.","created_at":"2015-12-07T17:32:27Z","updated_at":"2015-12-08T15:10:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8920b869bfc02bc32cbb17b0050dc115cf5f5d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/5653/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/5653/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5653/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/1d0a51ed0ddcd2ac3e38b4bc2cdd8d030de19749","head":{"label":"johnpmitsch:rails4_content_host_registration","ref":"rails4_content_host_registration","sha":"1d0a51ed0ddcd2ac3e38b4bc2cdd8d030de19749","user":{"login":"johnpmitsch","id":5964462,"avatar_url":"https://avatars.githubusercontent.com/u/5964462?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpmitsch","html_url":"https://github.com/johnpmitsch","followers_url":"https://api.github.com/users/johnpmitsch/followers","following_url":"https://api.github.com/users/johnpmitsch/following{/other_user}","gists_url":"https://api.github.com/users/johnpmitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpmitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpmitsch/subscriptions","organizations_url":"https://api.github.com/users/johnpmitsch/orgs","repos_url":"https://api.github.com/users/johnpmitsch/repos","events_url":"https://api.github.com/users/johnpmitsch/events{/privacy}","received_events_url":"https://api.github.com/users/johnpmitsch/received_events","type":"User","site_admin":false},"repo":{"id":35971034,"name":"katello","full_name":"johnpmitsch/katello","owner":{"login":"johnpmitsch","id":5964462,"avatar_url":"https://avatars.githubusercontent.com/u/5964462?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpmitsch","html_url":"https://github.com/johnpmitsch","followers_url":"https://api.github.com/users/johnpmitsch/followers","following_url":"https://api.github.com/users/johnpmitsch/following{/other_user}","gists_url":"https://api.github.com/users/johnpmitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpmitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpmitsch/subscriptions","organizations_url":"https://api.github.com/users/johnpmitsch/orgs","repos_url":"https://api.github.com/users/johnpmitsch/repos","events_url":"https://api.github.com/users/johnpmitsch/events{/privacy}","received_events_url":"https://api.github.com/users/johnpmitsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnpmitsch/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":true,"url":"https://api.github.com/repos/johnpmitsch/katello","forks_url":"https://api.github.com/repos/johnpmitsch/katello/forks","keys_url":"https://api.github.com/repos/johnpmitsch/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnpmitsch/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnpmitsch/katello/teams","hooks_url":"https://api.github.com/repos/johnpmitsch/katello/hooks","issue_events_url":"https://api.github.com/repos/johnpmitsch/katello/issues/events{/number}","events_url":"https://api.github.com/repos/johnpmitsch/katello/events","assignees_url":"https://api.github.com/repos/johnpmitsch/katello/assignees{/user}","branches_url":"https://api.github.com/repos/johnpmitsch/katello/branches{/branch}","tags_url":"https://api.github.com/repos/johnpmitsch/katello/tags","blobs_url":"https://api.github.com/repos/johnpmitsch/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnpmitsch/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnpmitsch/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnpmitsch/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnpmitsch/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/johnpmitsch/katello/languages","stargazers_url":"https://api.github.com/repos/johnpmitsch/katello/stargazers","contributors_url":"https://api.github.com/repos/johnpmitsch/katello/contributors","subscribers_url":"https://api.github.com/repos/johnpmitsch/katello/subscribers","subscription_url":"https://api.github.com/repos/johnpmitsch/katello/subscription","commits_url":"https://api.github.com/repos/johnpmitsch/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnpmitsch/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnpmitsch/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnpmitsch/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnpmitsch/katello/contents/{+path}","compare_url":"https://api.github.com/repos/johnpmitsch/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnpmitsch/katello/merges","archive_url":"https://api.github.com/repos/johnpmitsch/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnpmitsch/katello/downloads","issues_url":"https://api.github.com/repos/johnpmitsch/katello/issues{/number}","pulls_url":"https://api.github.com/repos/johnpmitsch/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/johnpmitsch/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/johnpmitsch/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnpmitsch/katello/labels{/name}","releases_url":"https://api.github.com/repos/johnpmitsch/katello/releases{/id}","created_at":"2015-05-20T19:57:53Z","updated_at":"2015-05-20T19:58:01Z","pushed_at":"2015-12-08T14:53:08Z","git_url":"git://github.com/johnpmitsch/katello.git","ssh_url":"git@github.com:johnpmitsch/katello.git","clone_url":"https://github.com/johnpmitsch/katello.git","svn_url":"https://github.com/johnpmitsch/katello","homepage":"katello.org","size":76118,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Katello:rails4","ref":"rails4","sha":"78f606ca8ae47e73518c4fc4710b7c2debe47946","user":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":4007018,"name":"katello","full_name":"Katello/katello","owner":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":false,"url":"https://api.github.com/repos/Katello/katello","forks_url":"https://api.github.com/repos/Katello/katello/forks","keys_url":"https://api.github.com/repos/Katello/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello/teams","hooks_url":"https://api.github.com/repos/Katello/katello/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello/events","assignees_url":"https://api.github.com/repos/Katello/katello/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello/tags","blobs_url":"https://api.github.com/repos/Katello/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello/languages","stargazers_url":"https://api.github.com/repos/Katello/katello/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello/subscription","commits_url":"https://api.github.com/repos/Katello/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello/merges","archive_url":"https://api.github.com/repos/Katello/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello/downloads","issues_url":"https://api.github.com/repos/Katello/katello/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello/releases{/id}","created_at":"2012-04-12T16:59:08Z","updated_at":"2015-11-30T10:16:12Z","pushed_at":"2015-12-08T14:53:09Z","git_url":"git://github.com/Katello/katello.git","ssh_url":"git@github.com:Katello/katello.git","clone_url":"https://github.com/Katello/katello.git","svn_url":"https://github.com/Katello/katello","homepage":"katello.org","size":88810,"stargazers_count":170,"watchers_count":170,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":101,"forks":118,"open_issues":101,"watchers":170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/5653"},"html":{"href":"https://github.com/Katello/katello/pull/5653"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/5653"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/5653/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/5653/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/5653/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/1d0a51ed0ddcd2ac3e38b4bc2cdd8d030de19749"}}}}