GitHub PullRequestReviewCommentEvent at 2014-07-11 07:31:53
Repository: rails
Actor: bigxiang
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/14809502","id":14809502,"diff_hunk":"@@ -883,4 +883,23 @@ def test_redefine_habtm\n     child.special_projects << SpecialProject.new(\"name\" => \"Special Project\")\n     assert child.save, 'child object should be saved'\n   end\n+\n+  def test_included_associations_size\n+    assert Project.first.salaried_developers.size,","path":"activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb","position":6,"original_position":6,"commit_id":"dbaa83795f74b62461ddfe3147923858059c93c3","original_commit_id":"dbaa83795f74b62461ddfe3147923858059c93c3","user":{"login":"bigxiang","id":289683,"avatar_url":"https://avatars.githubusercontent.com/u/289683?","gravatar_id":"1e192c011bd59b40d0ce6494cab40c9a","url":"https://api.github.com/users/bigxiang","html_url":"https://github.com/bigxiang","followers_url":"https://api.github.com/users/bigxiang/followers","following_url":"https://api.github.com/users/bigxiang/following{/other_user}","gists_url":"https://api.github.com/users/bigxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/bigxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigxiang/subscriptions","organizations_url":"https://api.github.com/users/bigxiang/orgs","repos_url":"https://api.github.com/users/bigxiang/repos","events_url":"https://api.github.com/users/bigxiang/events{/privacy}","received_events_url":"https://api.github.com/users/bigxiang/received_events","type":"User","site_admin":false},"body":"Yes, my fault. I would change it.","created_at":"2014-07-11T07:31:53Z","updated_at":"2014-07-11T07:31:53Z","html_url":"https://github.com/rails/rails/pull/16122#discussion_r14809502","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/16122","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/14809502"},"html":{"href":"https://github.com/rails/rails/pull/16122#discussion_r14809502"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/16122"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/16122","id":18205993,"html_url":"https://github.com/rails/rails/pull/16122","diff_url":"https://github.com/rails/rails/pull/16122.diff","patch_url":"https://github.com/rails/rails/pull/16122.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/16122","number":16122,"state":"open","title":"Includes HABTM returns correct size now. Fixes #16032","user":{"login":"bigxiang","id":289683,"avatar_url":"https://avatars.githubusercontent.com/u/289683?","gravatar_id":"1e192c011bd59b40d0ce6494cab40c9a","url":"https://api.github.com/users/bigxiang","html_url":"https://github.com/bigxiang","followers_url":"https://api.github.com/users/bigxiang/followers","following_url":"https://api.github.com/users/bigxiang/following{/other_user}","gists_url":"https://api.github.com/users/bigxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/bigxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigxiang/subscriptions","organizations_url":"https://api.github.com/users/bigxiang/orgs","repos_url":"https://api.github.com/users/bigxiang/repos","events_url":"https://api.github.com/users/bigxiang/events{/privacy}","received_events_url":"https://api.github.com/users/bigxiang/received_events","type":"User","site_admin":false},"body":"Includes HABTM returns correct size now. It's caused by the join dependency only instantiates one HABTM object because the join table hasn't a primary key.\r\n\r\nFixes #16032.\r\n\r\n### Examples:\r\n\r\nbefore:\r\n```ruby\r\n    Project.first.salaried_developers.size # => 3\r\n    Project.includes(:salaried_developers).first.salaried_developers.size # => 1\r\n```\r\nafter:\r\n```ruby\r\n    Project.first.salaried_developers.size # => 3\r\n    Project.includes(:salaried_developers).first.salaried_developers.size # => 3\r\n```","created_at":"2014-07-10T08:15:55Z","updated_at":"2014-07-11T07:31:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6bc7450af05f4eae776c1239973d0ee34820832","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/16122/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/16122/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/16122/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/dbaa83795f74b62461ddfe3147923858059c93c3","head":{"label":"bigxiang:habtm-with-where-includes-16032","ref":"habtm-with-where-includes-16032","sha":"dbaa83795f74b62461ddfe3147923858059c93c3","user":{"login":"bigxiang","id":289683,"avatar_url":"https://avatars.githubusercontent.com/u/289683?","gravatar_id":"1e192c011bd59b40d0ce6494cab40c9a","url":"https://api.github.com/users/bigxiang","html_url":"https://github.com/bigxiang","followers_url":"https://api.github.com/users/bigxiang/followers","following_url":"https://api.github.com/users/bigxiang/following{/other_user}","gists_url":"https://api.github.com/users/bigxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/bigxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigxiang/subscriptions","organizations_url":"https://api.github.com/users/bigxiang/orgs","repos_url":"https://api.github.com/users/bigxiang/repos","events_url":"https://api.github.com/users/bigxiang/events{/privacy}","received_events_url":"https://api.github.com/users/bigxiang/received_events","type":"User","site_admin":false},"repo":{"id":19420472,"name":"rails","full_name":"bigxiang/rails","owner":{"login":"bigxiang","id":289683,"avatar_url":"https://avatars.githubusercontent.com/u/289683?","gravatar_id":"1e192c011bd59b40d0ce6494cab40c9a","url":"https://api.github.com/users/bigxiang","html_url":"https://github.com/bigxiang","followers_url":"https://api.github.com/users/bigxiang/followers","following_url":"https://api.github.com/users/bigxiang/following{/other_user}","gists_url":"https://api.github.com/users/bigxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/bigxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigxiang/subscriptions","organizations_url":"https://api.github.com/users/bigxiang/orgs","repos_url":"https://api.github.com/users/bigxiang/repos","events_url":"https://api.github.com/users/bigxiang/events{/privacy}","received_events_url":"https://api.github.com/users/bigxiang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bigxiang/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/bigxiang/rails","forks_url":"https://api.github.com/repos/bigxiang/rails/forks","keys_url":"https://api.github.com/repos/bigxiang/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigxiang/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigxiang/rails/teams","hooks_url":"https://api.github.com/repos/bigxiang/rails/hooks","issue_events_url":"https://api.github.com/repos/bigxiang/rails/issues/events{/number}","events_url":"https://api.github.com/repos/bigxiang/rails/events","assignees_url":"https://api.github.com/repos/bigxiang/rails/assignees{/user}","branches_url":"https://api.github.com/repos/bigxiang/rails/branches{/branch}","tags_url":"https://api.github.com/repos/bigxiang/rails/tags","blobs_url":"https://api.github.com/repos/bigxiang/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigxiang/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigxiang/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigxiang/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigxiang/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/bigxiang/rails/languages","stargazers_url":"https://api.github.com/repos/bigxiang/rails/stargazers","contributors_url":"https://api.github.com/repos/bigxiang/rails/contributors","subscribers_url":"https://api.github.com/repos/bigxiang/rails/subscribers","subscription_url":"https://api.github.com/repos/bigxiang/rails/subscription","commits_url":"https://api.github.com/repos/bigxiang/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigxiang/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigxiang/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigxiang/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/bigxiang/rails/contents/{+path}","compare_url":"https://api.github.com/repos/bigxiang/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigxiang/rails/merges","archive_url":"https://api.github.com/repos/bigxiang/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigxiang/rails/downloads","issues_url":"https://api.github.com/repos/bigxiang/rails/issues{/number}","pulls_url":"https://api.github.com/repos/bigxiang/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/bigxiang/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/bigxiang/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigxiang/rails/labels{/name}","releases_url":"https://api.github.com/repos/bigxiang/rails/releases{/id}","created_at":"2014-05-04T06:35:33Z","updated_at":"2014-05-06T13:41:46Z","pushed_at":"2014-07-10T13:14:55Z","git_url":"git://github.com/bigxiang/rails.git","ssh_url":"git@github.com:bigxiang/rails.git","clone_url":"https://github.com/bigxiang/rails.git","svn_url":"https://github.com/bigxiang/rails","homepage":"http://rubyonrails.org","size":115085,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":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":"6b6832eeeb43c5f2553373f84677350ba654346a","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","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?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","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":"2014-07-11T05:47:20Z","pushed_at":"2014-07-11T05:03:29Z","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":342938,"stargazers_count":22418,"watchers_count":22418,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":8352,"mirror_url":null,"open_issues_count":627,"forks":8352,"open_issues":627,"watchers":22418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/16122"},"html":{"href":"https://github.com/rails/rails/pull/16122"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/16122"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/16122/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/16122/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/16122/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/dbaa83795f74b62461ddfe3147923858059c93c3"}}}}