{"action":"opened","number":22400,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/22400","id":51704676,"html_url":"https://github.com/rails/rails/pull/22400","diff_url":"https://github.com/rails/rails/pull/22400.diff","patch_url":"https://github.com/rails/rails/pull/22400.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/22400","number":22400,"state":"open","locked":false,"title":"Deprecate find_in_batches and find_each, use AR::Relation#in_batches","user":{"login":"siadat","id":364548,"avatar_url":"https://avatars.githubusercontent.com/u/364548?v=3","gravatar_id":"","url":"https://api.github.com/users/siadat","html_url":"https://github.com/siadat","followers_url":"https://api.github.com/users/siadat/followers","following_url":"https://api.github.com/users/siadat/following{/other_user}","gists_url":"https://api.github.com/users/siadat/gists{/gist_id}","starred_url":"https://api.github.com/users/siadat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siadat/subscriptions","organizations_url":"https://api.github.com/users/siadat/orgs","repos_url":"https://api.github.com/users/siadat/repos","events_url":"https://api.github.com/users/siadat/events{/privacy}","received_events_url":"https://api.github.com/users/siadat/received_events","type":"User","site_admin":false},"body":"Regarding #20933, I think it would be a good idea to discuss the in_batches API and the deprecation of the find_each and find_in_batches. I am submitting this as a PR to help review how the deprecation would look like if you decide it should be done.\r\n\r\nI added two new tests to ensure find_each and find_in_batches are deprecated, and removed the old tests. Let me know if I should keep the other tests.\r\n\r\nAlso, I would like to suggest to set `load: true` by default, so users are able to refactor their existing `find_in_batches` to `in_batches.each` instead of the more verbose `in_batches(load: true).each`.\r\n\r\nThanks!","created_at":"2015-11-24T19:23:38Z","updated_at":"2015-11-24T19:23:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/22400/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/22400/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/22400/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/5b6ee2bfcdefe1ab1ef3a40a87007ce25fac31b4","head":{"label":"siadat:deprecate-find_in_batches","ref":"deprecate-find_in_batches","sha":"5b6ee2bfcdefe1ab1ef3a40a87007ce25fac31b4","user":{"login":"siadat","id":364548,"avatar_url":"https://avatars.githubusercontent.com/u/364548?v=3","gravatar_id":"","url":"https://api.github.com/users/siadat","html_url":"https://github.com/siadat","followers_url":"https://api.github.com/users/siadat/followers","following_url":"https://api.github.com/users/siadat/following{/other_user}","gists_url":"https://api.github.com/users/siadat/gists{/gist_id}","starred_url":"https://api.github.com/users/siadat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siadat/subscriptions","organizations_url":"https://api.github.com/users/siadat/orgs","repos_url":"https://api.github.com/users/siadat/repos","events_url":"https://api.github.com/users/siadat/events{/privacy}","received_events_url":"https://api.github.com/users/siadat/received_events","type":"User","site_admin":false},"repo":{"id":39196016,"name":"rails","full_name":"siadat/rails","owner":{"login":"siadat","id":364548,"avatar_url":"https://avatars.githubusercontent.com/u/364548?v=3","gravatar_id":"","url":"https://api.github.com/users/siadat","html_url":"https://github.com/siadat","followers_url":"https://api.github.com/users/siadat/followers","following_url":"https://api.github.com/users/siadat/following{/other_user}","gists_url":"https://api.github.com/users/siadat/gists{/gist_id}","starred_url":"https://api.github.com/users/siadat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siadat/subscriptions","organizations_url":"https://api.github.com/users/siadat/orgs","repos_url":"https://api.github.com/users/siadat/repos","events_url":"https://api.github.com/users/siadat/events{/privacy}","received_events_url":"https://api.github.com/users/siadat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/siadat/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/siadat/rails","forks_url":"https://api.github.com/repos/siadat/rails/forks","keys_url":"https://api.github.com/repos/siadat/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/siadat/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/siadat/rails/teams","hooks_url":"https://api.github.com/repos/siadat/rails/hooks","issue_events_url":"https://api.github.com/repos/siadat/rails/issues/events{/number}","events_url":"https://api.github.com/repos/siadat/rails/events","assignees_url":"https://api.github.com/repos/siadat/rails/assignees{/user}","branches_url":"https://api.github.com/repos/siadat/rails/branches{/branch}","tags_url":"https://api.github.com/repos/siadat/rails/tags","blobs_url":"https://api.github.com/repos/siadat/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/siadat/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/siadat/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/siadat/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/siadat/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/siadat/rails/languages","stargazers_url":"https://api.github.com/repos/siadat/rails/stargazers","contributors_url":"https://api.github.com/repos/siadat/rails/contributors","subscribers_url":"https://api.github.com/repos/siadat/rails/subscribers","subscription_url":"https://api.github.com/repos/siadat/rails/subscription","commits_url":"https://api.github.com/repos/siadat/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/siadat/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/siadat/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/siadat/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/siadat/rails/contents/{+path}","compare_url":"https://api.github.com/repos/siadat/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/siadat/rails/merges","archive_url":"https://api.github.com/repos/siadat/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/siadat/rails/downloads","issues_url":"https://api.github.com/repos/siadat/rails/issues{/number}","pulls_url":"https://api.github.com/repos/siadat/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/siadat/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/siadat/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/siadat/rails/labels{/name}","releases_url":"https://api.github.com/repos/siadat/rails/releases{/id}","created_at":"2015-07-16T12:39:34Z","updated_at":"2015-07-16T12:40:08Z","pushed_at":"2015-11-24T19:02:37Z","git_url":"git://github.com/siadat/rails.git","ssh_url":"git@github.com:siadat/rails.git","clone_url":"https://github.com/siadat/rails.git","svn_url":"https://github.com/siadat/rails","homepage":"http://rubyonrails.org","size":119418,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"rails:master","ref":"master","sha":"58cea7f2dc7426c3f7445adfb8925880ec1b3644","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":"2015-11-24T14:59:59Z","pushed_at":"2015-11-24T18:55:39Z","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":322216,"stargazers_count":28503,"watchers_count":28503,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11530,"mirror_url":null,"open_issues_count":859,"forks":11530,"open_issues":859,"watchers":28503,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/22400"},"html":{"href":"https://github.com/rails/rails/pull/22400"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/22400"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/22400/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/22400/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/22400/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/5b6ee2bfcdefe1ab1ef3a40a87007ce25fac31b4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":26,"deletions":234,"changed_files":4}}