{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/26531460","id":26531460,"diff_hunk":"@@ -88,7 +88,7 @@ def connection\n     end\n \n     def connection_id\n-      ActiveRecord::RuntimeRegistry.connection_id\n+      Thread.current.object_id\n     end\n \n     def connection_id=(connection_id)","path":"activerecord/lib/active_record/connection_handling.rb","position":null,"original_position":8,"commit_id":"c955d2a34bbec4e2712f7d6a0ffefc5d89024d33","original_commit_id":"30c2c783930e94c3bbe56d2c913ad50949d0e9a2","user":{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false},"body":":+1: done","created_at":"2015-03-16T21:53:10Z","updated_at":"2015-03-16T21:53:10Z","html_url":"https://github.com/rails/rails/pull/19341#discussion_r26531460","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/19341","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/26531460"},"html":{"href":"https://github.com/rails/rails/pull/19341#discussion_r26531460"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/19341"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19341","id":31201231,"html_url":"https://github.com/rails/rails/pull/19341","diff_url":"https://github.com/rails/rails/pull/19341.diff","patch_url":"https://github.com/rails/rails/pull/19341.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/19341","number":19341,"state":"open","locked":false,"title":"Pass connection rather than connection ID","user":{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false},"body":"`connection_id` shouldn't be changed so we don't need to explicitly pass\r\nit around. If you want to change the `connection_id` then `#with_connection`\r\nshould be used instead. Changing the `connection_id` directly could\r\nresult in issues with ActiveRecord connections.\r\n\r\nThis change allows the connection to be cached through the stack by\r\npassing `connection` rather than `connection_id`.\r\n\r\nI'm sending this as a PR instead of pushing it directly because @tenderlove and I are unsure about this change. Tests pass but you never know :wink:","created_at":"2015-03-15T14:46:36Z","updated_at":"2015-03-16T21:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8d1f2ff8c284e7470e17849f2d041dfac2bec98","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/19341/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/19341/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/19341/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/c955d2a34bbec4e2712f7d6a0ffefc5d89024d33","head":{"label":"eileencodes:pass-connection-rather-than-connection-id","ref":"pass-connection-rather-than-connection-id","sha":"c955d2a34bbec4e2712f7d6a0ffefc5d89024d33","user":{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false},"repo":{"id":18083561,"name":"rails","full_name":"eileencodes/rails","owner":{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eileencodes/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/eileencodes/rails","forks_url":"https://api.github.com/repos/eileencodes/rails/forks","keys_url":"https://api.github.com/repos/eileencodes/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eileencodes/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eileencodes/rails/teams","hooks_url":"https://api.github.com/repos/eileencodes/rails/hooks","issue_events_url":"https://api.github.com/repos/eileencodes/rails/issues/events{/number}","events_url":"https://api.github.com/repos/eileencodes/rails/events","assignees_url":"https://api.github.com/repos/eileencodes/rails/assignees{/user}","branches_url":"https://api.github.com/repos/eileencodes/rails/branches{/branch}","tags_url":"https://api.github.com/repos/eileencodes/rails/tags","blobs_url":"https://api.github.com/repos/eileencodes/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eileencodes/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eileencodes/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/eileencodes/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eileencodes/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/eileencodes/rails/languages","stargazers_url":"https://api.github.com/repos/eileencodes/rails/stargazers","contributors_url":"https://api.github.com/repos/eileencodes/rails/contributors","subscribers_url":"https://api.github.com/repos/eileencodes/rails/subscribers","subscription_url":"https://api.github.com/repos/eileencodes/rails/subscription","commits_url":"https://api.github.com/repos/eileencodes/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/eileencodes/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/eileencodes/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/eileencodes/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/eileencodes/rails/contents/{+path}","compare_url":"https://api.github.com/repos/eileencodes/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eileencodes/rails/merges","archive_url":"https://api.github.com/repos/eileencodes/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eileencodes/rails/downloads","issues_url":"https://api.github.com/repos/eileencodes/rails/issues{/number}","pulls_url":"https://api.github.com/repos/eileencodes/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/eileencodes/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/eileencodes/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eileencodes/rails/labels{/name}","releases_url":"https://api.github.com/repos/eileencodes/rails/releases{/id}","created_at":"2014-03-25T00:18:13Z","updated_at":"2015-03-15T14:42:53Z","pushed_at":"2015-03-16T21:52:21Z","git_url":"git://github.com/eileencodes/rails.git","ssh_url":"git@github.com:eileencodes/rails.git","clone_url":"https://github.com/eileencodes/rails.git","svn_url":"https://github.com/eileencodes/rails","homepage":"http://rubyonrails.org","size":128652,"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":"82c2baf5348c7f1fa54f410282c11ba1cee2f377","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-03-16T20:58:20Z","pushed_at":"2015-03-16T17:36:16Z","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":390595,"stargazers_count":25280,"watchers_count":25280,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9899,"mirror_url":null,"open_issues_count":728,"forks":9899,"open_issues":728,"watchers":25280,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/19341"},"html":{"href":"https://github.com/rails/rails/pull/19341"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/19341"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/19341/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/19341/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/19341/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/c955d2a34bbec4e2712f7d6a0ffefc5d89024d33"}}}}