{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/46077780","id":46077780,"diff_hunk":"@@ -1,3 +1,7 @@\n+*   In url_for, never append a question mark to the URL when the query string\n+    is empty anyway.  (It used to do that when called like `url_for(controller:\n+    'x', action: 'y', q: {})`.)\n+","path":"actionpack/CHANGELOG.md","position":4,"original_position":4,"commit_id":"e6e056c2c141ec94eb8e79a30ee766f77fdaf30d","original_commit_id":"e6e056c2c141ec94eb8e79a30ee766f77fdaf30d","user":{"login":"yui-knk","id":5356517,"avatar_url":"https://avatars.githubusercontent.com/u/5356517?v=3","gravatar_id":"","url":"https://api.github.com/users/yui-knk","html_url":"https://github.com/yui-knk","followers_url":"https://api.github.com/users/yui-knk/followers","following_url":"https://api.github.com/users/yui-knk/following{/other_user}","gists_url":"https://api.github.com/users/yui-knk/gists{/gist_id}","starred_url":"https://api.github.com/users/yui-knk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yui-knk/subscriptions","organizations_url":"https://api.github.com/users/yui-knk/orgs","repos_url":"https://api.github.com/users/yui-knk/repos","events_url":"https://api.github.com/users/yui-knk/events{/privacy}","received_events_url":"https://api.github.com/users/yui-knk/received_events","type":"User","site_admin":false},"body":"@pdg137  I created PR, please check your name :)\r\nhttps://github.com/rails/rails/pull/22437","created_at":"2015-11-28T08:45:34Z","updated_at":"2015-11-28T08:45:34Z","html_url":"https://github.com/rails/rails/pull/21241#discussion_r46077780","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/21241","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/46077780"},"html":{"href":"https://github.com/rails/rails/pull/21241#discussion_r46077780"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/21241"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/21241","id":42508485,"html_url":"https://github.com/rails/rails/pull/21241","diff_url":"https://github.com/rails/rails/pull/21241.diff","patch_url":"https://github.com/rails/rails/pull/21241.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/21241","number":21241,"state":"closed","locked":false,"title":"In url_for, never append ? when the query string is empty anyway.","user":{"login":"pdg137","id":466760,"avatar_url":"https://avatars.githubusercontent.com/u/466760?v=3","gravatar_id":"","url":"https://api.github.com/users/pdg137","html_url":"https://github.com/pdg137","followers_url":"https://api.github.com/users/pdg137/followers","following_url":"https://api.github.com/users/pdg137/following{/other_user}","gists_url":"https://api.github.com/users/pdg137/gists{/gist_id}","starred_url":"https://api.github.com/users/pdg137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdg137/subscriptions","organizations_url":"https://api.github.com/users/pdg137/orgs","repos_url":"https://api.github.com/users/pdg137/repos","events_url":"https://api.github.com/users/pdg137/events{/privacy}","received_events_url":"https://api.github.com/users/pdg137/received_events","type":"User","site_admin":false},"body":"It used to behave like this:\r\n\r\n    url_for(controller: 'x', action: 'y', q: {})\r\n    # -> \"/x/y?\"\r\n\r\nWe previously avoided empty query strings in most cases by removing\r\nnil values, then checking whether params was empty.  But as you can\r\nsee above, even non-empty params can yield an empty query string.  So\r\nI changed the code to just directly check whether the query string\r\nended up empty.\r\n\r\n(To make everything more consistent, the \"removing nil values\"\r\nfunctionality should probably move to ActionPack's Hash#to_query, the\r\nplace where empty hashes and arrays get removed.  However, this would\r\nchange a lot more behavior.)","created_at":"2015-08-14T23:56:44Z","updated_at":"2015-11-28T08:45:34Z","closed_at":"2015-11-26T21:10:46Z","merged_at":"2015-11-26T21:10:46Z","merge_commit_sha":"236e01dfc47e677db442049d35b0d218aaa826b5","assignee":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/21241/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/21241/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/21241/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/e6e056c2c141ec94eb8e79a30ee766f77fdaf30d","head":{"label":"pdg137:master","ref":"master","sha":"e6e056c2c141ec94eb8e79a30ee766f77fdaf30d","user":{"login":"pdg137","id":466760,"avatar_url":"https://avatars.githubusercontent.com/u/466760?v=3","gravatar_id":"","url":"https://api.github.com/users/pdg137","html_url":"https://github.com/pdg137","followers_url":"https://api.github.com/users/pdg137/followers","following_url":"https://api.github.com/users/pdg137/following{/other_user}","gists_url":"https://api.github.com/users/pdg137/gists{/gist_id}","starred_url":"https://api.github.com/users/pdg137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdg137/subscriptions","organizations_url":"https://api.github.com/users/pdg137/orgs","repos_url":"https://api.github.com/users/pdg137/repos","events_url":"https://api.github.com/users/pdg137/events{/privacy}","received_events_url":"https://api.github.com/users/pdg137/received_events","type":"User","site_admin":false},"repo":{"id":20705450,"name":"rails","full_name":"pdg137/rails","owner":{"login":"pdg137","id":466760,"avatar_url":"https://avatars.githubusercontent.com/u/466760?v=3","gravatar_id":"","url":"https://api.github.com/users/pdg137","html_url":"https://github.com/pdg137","followers_url":"https://api.github.com/users/pdg137/followers","following_url":"https://api.github.com/users/pdg137/following{/other_user}","gists_url":"https://api.github.com/users/pdg137/gists{/gist_id}","starred_url":"https://api.github.com/users/pdg137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdg137/subscriptions","organizations_url":"https://api.github.com/users/pdg137/orgs","repos_url":"https://api.github.com/users/pdg137/repos","events_url":"https://api.github.com/users/pdg137/events{/privacy}","received_events_url":"https://api.github.com/users/pdg137/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pdg137/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/pdg137/rails","forks_url":"https://api.github.com/repos/pdg137/rails/forks","keys_url":"https://api.github.com/repos/pdg137/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdg137/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdg137/rails/teams","hooks_url":"https://api.github.com/repos/pdg137/rails/hooks","issue_events_url":"https://api.github.com/repos/pdg137/rails/issues/events{/number}","events_url":"https://api.github.com/repos/pdg137/rails/events","assignees_url":"https://api.github.com/repos/pdg137/rails/assignees{/user}","branches_url":"https://api.github.com/repos/pdg137/rails/branches{/branch}","tags_url":"https://api.github.com/repos/pdg137/rails/tags","blobs_url":"https://api.github.com/repos/pdg137/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdg137/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdg137/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdg137/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdg137/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/pdg137/rails/languages","stargazers_url":"https://api.github.com/repos/pdg137/rails/stargazers","contributors_url":"https://api.github.com/repos/pdg137/rails/contributors","subscribers_url":"https://api.github.com/repos/pdg137/rails/subscribers","subscription_url":"https://api.github.com/repos/pdg137/rails/subscription","commits_url":"https://api.github.com/repos/pdg137/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdg137/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdg137/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdg137/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/pdg137/rails/contents/{+path}","compare_url":"https://api.github.com/repos/pdg137/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdg137/rails/merges","archive_url":"https://api.github.com/repos/pdg137/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdg137/rails/downloads","issues_url":"https://api.github.com/repos/pdg137/rails/issues{/number}","pulls_url":"https://api.github.com/repos/pdg137/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/pdg137/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/pdg137/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdg137/rails/labels{/name}","releases_url":"https://api.github.com/repos/pdg137/rails/releases{/id}","created_at":"2014-06-10T23:32:04Z","updated_at":"2015-03-10T00:47:46Z","pushed_at":"2015-10-30T00:02:49Z","git_url":"git://github.com/pdg137/rails.git","ssh_url":"git@github.com:pdg137/rails.git","clone_url":"https://github.com/pdg137/rails.git","svn_url":"https://github.com/pdg137/rails","homepage":"http://rubyonrails.org","size":115191,"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":"8941831733fc56e2b1872f41c85cc48d782bb984","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-28T06:48:58Z","pushed_at":"2015-11-28T08:40: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":322413,"stargazers_count":28546,"watchers_count":28546,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11547,"mirror_url":null,"open_issues_count":876,"forks":11547,"open_issues":876,"watchers":28546,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/21241"},"html":{"href":"https://github.com/rails/rails/pull/21241"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/21241"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/21241/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/21241/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/21241/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/e6e056c2c141ec94eb8e79a30ee766f77fdaf30d"}}}}