GitHub PullRequestEvent at 2014-01-21 21:52:56
Repository: rails
Actor: kuldeepaggarwal
Payload: {"action":"opened","number":13785,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/13785","id":11733274,"html_url":"https://github.com/rails/rails/pull/13785","diff_url":"https://github.com/rails/rails/pull/13785.diff","patch_url":"https://github.com/rails/rails/pull/13785.patch","issue_url":"https://github.com/rails/rails/pull/13785","number":13785,"state":"open","title":"Fix `ActiveRecord::RecordNotFound` error message with custom primary key","user":{"login":"kuldeepaggarwal","id":1930730,"avatar_url":"https://gravatar.com/avatar/01b503429af49547f75e78abcf5e48cb?d=https%3A%2F%2Fidenticons.github.com%2F855ec73bf9619f0fbf63784481d6ead1.png&r=x","gravatar_id":"01b503429af49547f75e78abcf5e48cb","url":"https://api.github.com/users/kuldeepaggarwal","html_url":"https://github.com/kuldeepaggarwal","followers_url":"https://api.github.com/users/kuldeepaggarwal/followers","following_url":"https://api.github.com/users/kuldeepaggarwal/following{/other_user}","gists_url":"https://api.github.com/users/kuldeepaggarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeepaggarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeepaggarwal/subscriptions","organizations_url":"https://api.github.com/users/kuldeepaggarwal/orgs","repos_url":"https://api.github.com/users/kuldeepaggarwal/repos","events_url":"https://api.github.com/users/kuldeepaggarwal/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeepaggarwal/received_events","type":"User","site_admin":false},"body":"\r\n```ruby\r\nclass User < AR::Base\r\n   self.primary_key = :name\r\nend\r\n\r\n# Before:\r\nUser.find 'Hello World!'\r\n# => ActiveRecord::RecordNotFound: Couldn't find Toy with name=Hello World!\r\nUser.find 'Hello', 'World!'\r\n# => ActiveRecord::RecordNotFound: Couldn't find all Toys with IDs (Hello, World!) (found 0 results, but was looking for 2)\r\n\r\n\r\n# After:\r\nUser.find 'Hello World!'\r\n# => ActiveRecord::RecordNotFound: Couldn't find Toy with name=Hello World!\r\nUser.find 'Hello', 'World!'\r\n# => ActiveRecord::RecordNotFound: Couldn't find all Toys with NAMEs (Hello, World!) (found 0 results, but was looking for 2)\r\n\r\n```","created_at":"2014-01-21T21:52:55Z","updated_at":"2014-01-21T21:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://github.com/rails/rails/pull/13785/commits","review_comments_url":"https://github.com/rails/rails/pull/13785/comments","review_comment_url":"/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/13785/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/4316ae59b42a4d88c540ef22014cd3379a35f316","head":{"label":"kuldeepaggarwal:fix-find_with_multiple_ids","ref":"fix-find_with_multiple_ids","sha":"4316ae59b42a4d88c540ef22014cd3379a35f316","user":{"login":"kuldeepaggarwal","id":1930730,"avatar_url":"https://gravatar.com/avatar/01b503429af49547f75e78abcf5e48cb?d=https%3A%2F%2Fidenticons.github.com%2F855ec73bf9619f0fbf63784481d6ead1.png&r=x","gravatar_id":"01b503429af49547f75e78abcf5e48cb","url":"https://api.github.com/users/kuldeepaggarwal","html_url":"https://github.com/kuldeepaggarwal","followers_url":"https://api.github.com/users/kuldeepaggarwal/followers","following_url":"https://api.github.com/users/kuldeepaggarwal/following{/other_user}","gists_url":"https://api.github.com/users/kuldeepaggarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeepaggarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeepaggarwal/subscriptions","organizations_url":"https://api.github.com/users/kuldeepaggarwal/orgs","repos_url":"https://api.github.com/users/kuldeepaggarwal/repos","events_url":"https://api.github.com/users/kuldeepaggarwal/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeepaggarwal/received_events","type":"User","site_admin":false},"repo":{"id":14265398,"name":"rails","full_name":"kuldeepaggarwal/rails","owner":{"login":"kuldeepaggarwal","id":1930730,"avatar_url":"https://gravatar.com/avatar/01b503429af49547f75e78abcf5e48cb?d=https%3A%2F%2Fidenticons.github.com%2F855ec73bf9619f0fbf63784481d6ead1.png&r=x","gravatar_id":"01b503429af49547f75e78abcf5e48cb","url":"https://api.github.com/users/kuldeepaggarwal","html_url":"https://github.com/kuldeepaggarwal","followers_url":"https://api.github.com/users/kuldeepaggarwal/followers","following_url":"https://api.github.com/users/kuldeepaggarwal/following{/other_user}","gists_url":"https://api.github.com/users/kuldeepaggarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeepaggarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeepaggarwal/subscriptions","organizations_url":"https://api.github.com/users/kuldeepaggarwal/orgs","repos_url":"https://api.github.com/users/kuldeepaggarwal/repos","events_url":"https://api.github.com/users/kuldeepaggarwal/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeepaggarwal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kuldeepaggarwal/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/kuldeepaggarwal/rails","forks_url":"https://api.github.com/repos/kuldeepaggarwal/rails/forks","keys_url":"https://api.github.com/repos/kuldeepaggarwal/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuldeepaggarwal/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuldeepaggarwal/rails/teams","hooks_url":"https://api.github.com/repos/kuldeepaggarwal/rails/hooks","issue_events_url":"https://api.github.com/repos/kuldeepaggarwal/rails/issues/events{/number}","events_url":"https://api.github.com/repos/kuldeepaggarwal/rails/events","assignees_url":"https://api.github.com/repos/kuldeepaggarwal/rails/assignees{/user}","branches_url":"https://api.github.com/repos/kuldeepaggarwal/rails/branches{/branch}","tags_url":"https://api.github.com/repos/kuldeepaggarwal/rails/tags","blobs_url":"https://api.github.com/repos/kuldeepaggarwal/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuldeepaggarwal/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuldeepaggarwal/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuldeepaggarwal/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuldeepaggarwal/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/kuldeepaggarwal/rails/languages","stargazers_url":"https://api.github.com/repos/kuldeepaggarwal/rails/stargazers","contributors_url":"https://api.github.com/repos/kuldeepaggarwal/rails/contributors","subscribers_url":"https://api.github.com/repos/kuldeepaggarwal/rails/subscribers","subscription_url":"https://api.github.com/repos/kuldeepaggarwal/rails/subscription","commits_url":"https://api.github.com/repos/kuldeepaggarwal/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuldeepaggarwal/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuldeepaggarwal/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuldeepaggarwal/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/kuldeepaggarwal/rails/contents/{+path}","compare_url":"https://api.github.com/repos/kuldeepaggarwal/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuldeepaggarwal/rails/merges","archive_url":"https://api.github.com/repos/kuldeepaggarwal/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuldeepaggarwal/rails/downloads","issues_url":"https://api.github.com/repos/kuldeepaggarwal/rails/issues{/number}","pulls_url":"https://api.github.com/repos/kuldeepaggarwal/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/kuldeepaggarwal/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/kuldeepaggarwal/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuldeepaggarwal/rails/labels{/name}","releases_url":"https://api.github.com/repos/kuldeepaggarwal/rails/releases{/id}","created_at":"2013-11-09T21:27:51Z","updated_at":"2014-01-21T21:52:55Z","pushed_at":"2014-01-21T21:37:01Z","git_url":"git://github.com/kuldeepaggarwal/rails.git","ssh_url":"git@github.com:kuldeepaggarwal/rails.git","clone_url":"https://github.com/kuldeepaggarwal/rails.git","svn_url":"https://github.com/kuldeepaggarwal/rails","homepage":"http://rubyonrails.org","size":105596,"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","master_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"c6ecfc1668d6e2c69d360ed376b9e3f77ad72e83","user":{"login":"rails","id":4223,"avatar_url":"https://gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https%3A%2F%2Fidenticons.github.com%2Ff42a37d114a480b6b57b60ea9a14a9d2.png&r=x","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://gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https%3A%2F%2Fidenticons.github.com%2Ff42a37d114a480b6b57b60ea9a14a9d2.png&r=x","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-01-21T21:39:57Z","pushed_at":"2014-01-21T21:39:56Z","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":241007,"stargazers_count":20587,"watchers_count":20587,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":7219,"mirror_url":null,"open_issues_count":745,"forks":7219,"open_issues":745,"watchers":20587,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/13785"},"html":{"href":"https://github.com/rails/rails/pull/13785"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/13785"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/13785/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/13785/comments"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/4316ae59b42a4d88c540ef22014cd3379a35f316"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":1,"changed_files":2}}