{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/18468","labels_url":"https://api.github.com/repos/rails/rails/issues/18468/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/18468/comments","events_url":"https://api.github.com/repos/rails/rails/issues/18468/events","html_url":"https://github.com/rails/rails/issues/18468","id":54084462,"number":18468,"title":"Unnecessary deprecation warning on inclusion of association with both scope and extension","user":{"login":"plehoux","id":129220,"avatar_url":"https://avatars.githubusercontent.com/u/129220?v=3","gravatar_id":"","url":"https://api.github.com/users/plehoux","html_url":"https://github.com/plehoux","followers_url":"https://api.github.com/users/plehoux/followers","following_url":"https://api.github.com/users/plehoux/following{/other_user}","gists_url":"https://api.github.com/users/plehoux/gists{/gist_id}","starred_url":"https://api.github.com/users/plehoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plehoux/subscriptions","organizations_url":"https://api.github.com/users/plehoux/orgs","repos_url":"https://api.github.com/users/plehoux/repos","events_url":"https://api.github.com/users/plehoux/events{/privacy}","received_events_url":"https://api.github.com/users/plehoux/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-12T17:50:37Z","updated_at":"2015-01-13T09:47:35Z","closed_at":"2015-01-13T09:47:35Z","body":"Self-contained gist : https://gist.github.com/plehoux/31d73b161199c0bcb317\r\n\r\nAbove code will trigger following deprecation warning :\r\n\r\n> DEPRECATION WARNING: The association scope 'comments' is instance dependent (the scope block takes an argument). Preloading happens before the individual instances are created. This means that there is no instance being passed to the association scope. This will most likely result in broken or incorrect behavior. Joining, Preloading and eager loading of these associations is deprecated and will be removed in the future. (called from test_association_stuff at\r\n\r\nNote that the scope ` -> { self }` does not take any argument. There is no warning if we remove the extension block.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/69719416","html_url":"https://github.com/rails/rails/issues/18468#issuecomment-69719416","issue_url":"https://api.github.com/repos/rails/rails/issues/18468","id":69719416,"user":{"login":"senny","id":5402,"avatar_url":"https://avatars.githubusercontent.com/u/5402?v=3","gravatar_id":"","url":"https://api.github.com/users/senny","html_url":"https://github.com/senny","followers_url":"https://api.github.com/users/senny/followers","following_url":"https://api.github.com/users/senny/following{/other_user}","gists_url":"https://api.github.com/users/senny/gists{/gist_id}","starred_url":"https://api.github.com/users/senny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senny/subscriptions","organizations_url":"https://api.github.com/users/senny/orgs","repos_url":"https://api.github.com/users/senny/repos","events_url":"https://api.github.com/users/senny/events{/privacy}","received_events_url":"https://api.github.com/users/senny/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T09:47:35Z","updated_at":"2015-01-13T09:47:35Z","body":"Closing in favor of #18467"}}