{"action":"created","comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/192553085","pull_request_review_id":125359270,"id":192553085,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjU1MzA4NQ==","diff_hunk":"@@ -176,20 +176,37 @@ defmodule Phoenix.Router.Helpers do\n       defp to_param(true), do: \"true\"\n       defp to_param(data), do: Phoenix.Param.to_param(data)\n \n-      defp segments(segments, [], _reserved) do\n+      defp segments!(segments, [], _reserved, _opts) do\n         segments\n       end\n \n-      defp segments(segments, query, reserved) do\n+      defp segments!(segments, query, reserved, _opts) when is_list(query) or is_map(query) do\n         dict = for {k, v} <- query,\n                not ((k = to_string(k)) in reserved),\n                do: {k, v}\n \n+\n         case Conn.Query.encode dict, &to_param/1 do\n           \"\" -> segments\n           o  -> segments <> \"?\" <> o\n         end\n       end\n+\n+      defp segments!(segments, query, reserved, {helper, opts, var_length}) do\n+        arity = var_length + 3\n+        call_vars = if var_length > 0, do: Enum.map(1..(var_length), &(\":arg#{&1}\")), else: []","path":"lib/phoenix/router/helpers.ex","position":24,"original_position":24,"commit_id":"3d247336e89934a464bb7f975bed9ad8005e93f8","original_commit_id":"3d247336e89934a464bb7f975bed9ad8005e93f8","user":{"login":"josevalim","id":9582,"node_id":"MDQ6VXNlcjk1ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/9582?v=4","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"Those things are not literal atoms, are they? So maybe it should be `arg#{&1}` instead of `:arg#{&1}`?","created_at":"2018-06-02T07:51:37Z","updated_at":"2018-06-02T07:51:38Z","html_url":"https://github.com/phoenixframework/phoenix/pull/2900#discussion_r192553085","pull_request_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/192553085"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/2900#discussion_r192553085"},"pull_request":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900"}}},"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900","id":191198645,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMTk4NjQ1","html_url":"https://github.com/phoenixframework/phoenix/pull/2900","diff_url":"https://github.com/phoenixframework/phoenix/pull/2900.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/2900.patch","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/2900","number":2900,"state":"open","locked":false,"title":"Show a better router error message when a non-Enumerable is passed as params","user":{"login":"Gazler","id":477511,"node_id":"MDQ6VXNlcjQ3NzUxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/477511?v=4","gravatar_id":"","url":"https://api.github.com/users/Gazler","html_url":"https://github.com/Gazler","followers_url":"https://api.github.com/users/Gazler/followers","following_url":"https://api.github.com/users/Gazler/following{/other_user}","gists_url":"https://api.github.com/users/Gazler/gists{/gist_id}","starred_url":"https://api.github.com/users/Gazler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gazler/subscriptions","organizations_url":"https://api.github.com/users/Gazler/orgs","repos_url":"https://api.github.com/users/Gazler/repos","events_url":"https://api.github.com/users/Gazler/events{/privacy}","received_events_url":"https://api.github.com/users/Gazler/received_events","type":"User","site_admin":false},"body":"Currently calling a path such as:\r\n\r\n  page_page(conn, :show, :id, \"extra-params\")\r\n\r\nWill raise a `Protocol.UndefinedError` as \"extra-params\" is not enumerable. A\r\ncustom error message is now raised in this scenario to prompt the user what to\r\ndo next.","created_at":"2018-05-29T16:11:55Z","updated_at":"2018-06-02T07:51:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6384098604fdf5702b47146587e4882334eedca8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900/commits","review_comments_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900/comments","review_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/2900/comments","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/3d247336e89934a464bb7f975bed9ad8005e93f8","head":{"label":"Gazler:feat/better-router-errors","ref":"feat/better-router-errors","sha":"3d247336e89934a464bb7f975bed9ad8005e93f8","user":{"login":"Gazler","id":477511,"node_id":"MDQ6VXNlcjQ3NzUxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/477511?v=4","gravatar_id":"","url":"https://api.github.com/users/Gazler","html_url":"https://github.com/Gazler","followers_url":"https://api.github.com/users/Gazler/followers","following_url":"https://api.github.com/users/Gazler/following{/other_user}","gists_url":"https://api.github.com/users/Gazler/gists{/gist_id}","starred_url":"https://api.github.com/users/Gazler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gazler/subscriptions","organizations_url":"https://api.github.com/users/Gazler/orgs","repos_url":"https://api.github.com/users/Gazler/repos","events_url":"https://api.github.com/users/Gazler/events{/privacy}","received_events_url":"https://api.github.com/users/Gazler/received_events","type":"User","site_admin":false},"repo":{"id":20971028,"node_id":"MDEwOlJlcG9zaXRvcnkyMDk3MTAyOA==","name":"phoenix","full_name":"Gazler/phoenix","owner":{"login":"Gazler","id":477511,"node_id":"MDQ6VXNlcjQ3NzUxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/477511?v=4","gravatar_id":"","url":"https://api.github.com/users/Gazler","html_url":"https://github.com/Gazler","followers_url":"https://api.github.com/users/Gazler/followers","following_url":"https://api.github.com/users/Gazler/following{/other_user}","gists_url":"https://api.github.com/users/Gazler/gists{/gist_id}","starred_url":"https://api.github.com/users/Gazler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gazler/subscriptions","organizations_url":"https://api.github.com/users/Gazler/orgs","repos_url":"https://api.github.com/users/Gazler/repos","events_url":"https://api.github.com/users/Gazler/events{/privacy}","received_events_url":"https://api.github.com/users/Gazler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gazler/phoenix","description":"Elixir Web Framework","fork":true,"url":"https://api.github.com/repos/Gazler/phoenix","forks_url":"https://api.github.com/repos/Gazler/phoenix/forks","keys_url":"https://api.github.com/repos/Gazler/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gazler/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gazler/phoenix/teams","hooks_url":"https://api.github.com/repos/Gazler/phoenix/hooks","issue_events_url":"https://api.github.com/repos/Gazler/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/Gazler/phoenix/events","assignees_url":"https://api.github.com/repos/Gazler/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/Gazler/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/Gazler/phoenix/tags","blobs_url":"https://api.github.com/repos/Gazler/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gazler/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gazler/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gazler/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gazler/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/Gazler/phoenix/languages","stargazers_url":"https://api.github.com/repos/Gazler/phoenix/stargazers","contributors_url":"https://api.github.com/repos/Gazler/phoenix/contributors","subscribers_url":"https://api.github.com/repos/Gazler/phoenix/subscribers","subscription_url":"https://api.github.com/repos/Gazler/phoenix/subscription","commits_url":"https://api.github.com/repos/Gazler/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gazler/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gazler/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gazler/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gazler/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/Gazler/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gazler/phoenix/merges","archive_url":"https://api.github.com/repos/Gazler/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gazler/phoenix/downloads","issues_url":"https://api.github.com/repos/Gazler/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/Gazler/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/Gazler/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/Gazler/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gazler/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/Gazler/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/Gazler/phoenix/deployments","created_at":"2014-06-18T17:19:07Z","updated_at":"2016-08-16T08:12:58Z","pushed_at":"2018-05-30T10:53:14Z","git_url":"git://github.com/Gazler/phoenix.git","ssh_url":"git@github.com:Gazler/phoenix.git","clone_url":"https://github.com/Gazler/phoenix.git","svn_url":"https://github.com/Gazler/phoenix","homepage":"","size":9432,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phoenixframework:master","ref":"master","sha":"172e57610a58ffb1b9f1a2805f39f72f93ef83e9","user":{"login":"phoenixframework","id":6510388,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MTAzODg=","avatar_url":"https://avatars2.githubusercontent.com/u/6510388?v=4","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"repo":{"id":16072585,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA3MjU4NQ==","name":"phoenix","full_name":"phoenixframework/phoenix","owner":{"login":"phoenixframework","id":6510388,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MTAzODg=","avatar_url":"https://avatars2.githubusercontent.com/u/6510388?v=4","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phoenixframework/phoenix","description":"Productive. Reliable. Fast.","fork":false,"url":"https://api.github.com/repos/phoenixframework/phoenix","forks_url":"https://api.github.com/repos/phoenixframework/phoenix/forks","keys_url":"https://api.github.com/repos/phoenixframework/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoenixframework/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoenixframework/phoenix/teams","hooks_url":"https://api.github.com/repos/phoenixframework/phoenix/hooks","issue_events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/phoenixframework/phoenix/events","assignees_url":"https://api.github.com/repos/phoenixframework/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/phoenixframework/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/phoenixframework/phoenix/tags","blobs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoenixframework/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoenixframework/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/phoenixframework/phoenix/languages","stargazers_url":"https://api.github.com/repos/phoenixframework/phoenix/stargazers","contributors_url":"https://api.github.com/repos/phoenixframework/phoenix/contributors","subscribers_url":"https://api.github.com/repos/phoenixframework/phoenix/subscribers","subscription_url":"https://api.github.com/repos/phoenixframework/phoenix/subscription","commits_url":"https://api.github.com/repos/phoenixframework/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoenixframework/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoenixframework/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/phoenixframework/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoenixframework/phoenix/merges","archive_url":"https://api.github.com/repos/phoenixframework/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoenixframework/phoenix/downloads","issues_url":"https://api.github.com/repos/phoenixframework/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/phoenixframework/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/phoenixframework/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/phoenixframework/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/phoenixframework/phoenix/deployments","created_at":"2014-01-20T14:14:11Z","updated_at":"2018-06-01T23:50:25Z","pushed_at":"2018-05-30T17:53:31Z","git_url":"git://github.com/phoenixframework/phoenix.git","ssh_url":"git@github.com:phoenixframework/phoenix.git","clone_url":"https://github.com/phoenixframework/phoenix.git","svn_url":"https://github.com/phoenixframework/phoenix","homepage":"http://www.phoenixframework.org","size":9447,"stargazers_count":11878,"watchers_count":11878,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1424,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1424,"open_issues":26,"watchers":11878,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/2900"},"issue":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/2900"},"comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/2900/comments"},"review_comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900/comments"},"review_comment":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/2900/commits"},"statuses":{"href":"https://api.github.com/repos/phoenixframework/phoenix/statuses/3d247336e89934a464bb7f975bed9ad8005e93f8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"josevalim"}}