{"action":"opened","number":23004,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/23004","id":55590397,"html_url":"https://github.com/rails/rails/pull/23004","diff_url":"https://github.com/rails/rails/pull/23004.diff","patch_url":"https://github.com/rails/rails/pull/23004.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/23004","number":23004,"state":"open","locked":false,"title":"Make default scopes + STI happy again","user":{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false},"body":"Fixes #22426 \r\n\r\n@sgrif I changed [explicitly tested] behaviour you introduced in 5e0b555b453ea2ca36986c111512627d806101e7 -- see `relation_scoping_test.rb`. But this interpretation still addresses #18806, and seems more consistent to me: this way, `Child.all` remains (hand-wavingly) equivalent to `Parent.where(type: 'Child')`, even when the parent has a scope applied.","created_at":"2016-01-11T06:29:07Z","updated_at":"2016-01-11T06:29:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/47","html_url":"https://github.com/rails/rails/milestones/5.0.0","labels_url":"https://api.github.com/repos/rails/rails/milestones/47/labels","id":1467326,"number":47,"title":"5.0.0","description":"","creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":242,"state":"open","created_at":"2015-12-18T21:17:59Z","updated_at":"2016-01-11T06:29:08Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/rails/rails/pulls/23004/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/23004/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/23004/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/84e2a491408f3fc56fd6c2e9b7f751cdc2880d41","head":{"label":"matthewd:default-scope-sti","ref":"default-scope-sti","sha":"84e2a491408f3fc56fd6c2e9b7f751cdc2880d41","user":{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false},"repo":{"id":15286637,"name":"rails","full_name":"matthewd/rails","owner":{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewd/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/matthewd/rails","forks_url":"https://api.github.com/repos/matthewd/rails/forks","keys_url":"https://api.github.com/repos/matthewd/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewd/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewd/rails/teams","hooks_url":"https://api.github.com/repos/matthewd/rails/hooks","issue_events_url":"https://api.github.com/repos/matthewd/rails/issues/events{/number}","events_url":"https://api.github.com/repos/matthewd/rails/events","assignees_url":"https://api.github.com/repos/matthewd/rails/assignees{/user}","branches_url":"https://api.github.com/repos/matthewd/rails/branches{/branch}","tags_url":"https://api.github.com/repos/matthewd/rails/tags","blobs_url":"https://api.github.com/repos/matthewd/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewd/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewd/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewd/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewd/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewd/rails/languages","stargazers_url":"https://api.github.com/repos/matthewd/rails/stargazers","contributors_url":"https://api.github.com/repos/matthewd/rails/contributors","subscribers_url":"https://api.github.com/repos/matthewd/rails/subscribers","subscription_url":"https://api.github.com/repos/matthewd/rails/subscription","commits_url":"https://api.github.com/repos/matthewd/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewd/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewd/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewd/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthewd/rails/contents/{+path}","compare_url":"https://api.github.com/repos/matthewd/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewd/rails/merges","archive_url":"https://api.github.com/repos/matthewd/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewd/rails/downloads","issues_url":"https://api.github.com/repos/matthewd/rails/issues{/number}","pulls_url":"https://api.github.com/repos/matthewd/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewd/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewd/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewd/rails/labels{/name}","releases_url":"https://api.github.com/repos/matthewd/rails/releases{/id}","created_at":"2013-12-18T15:27:43Z","updated_at":"2015-04-24T03:45:44Z","pushed_at":"2016-01-11T06:16:48Z","git_url":"git://github.com/matthewd/rails.git","ssh_url":"git@github.com:matthewd/rails.git","clone_url":"https://github.com/matthewd/rails.git","svn_url":"https://github.com/matthewd/rails","homepage":"http://rubyonrails.org","size":115290,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"5465224892281a088422df438e4fc0ce7f6c8f5e","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2016-01-11T06:05:17Z","pushed_at":"2016-01-11T06:19:54Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":320789,"stargazers_count":29111,"watchers_count":29111,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11797,"mirror_url":null,"open_issues_count":839,"forks":11797,"open_issues":839,"watchers":29111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/23004"},"html":{"href":"https://github.com/rails/rails/pull/23004"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/23004"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/23004/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/23004/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/23004/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/84e2a491408f3fc56fd6c2e9b7f751cdc2880d41"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":59,"deletions":19,"changed_files":7}}