{"action":"created","issue":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1113","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1113/labels{/name}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1113/comments","events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1113/events","html_url":"https://github.com/phoenixframework/phoenix/pull/1113","id":100175873,"number":1113,"title":"Makes routing helpers use request data to determine URLs when invoked with a Plug.Conn","user":{"login":"stevegraham","id":18622,"avatar_url":"https://avatars.githubusercontent.com/u/18622?v=3","gravatar_id":"","url":"https://api.github.com/users/stevegraham","html_url":"https://github.com/stevegraham","followers_url":"https://api.github.com/users/stevegraham/followers","following_url":"https://api.github.com/users/stevegraham/following{/other_user}","gists_url":"https://api.github.com/users/stevegraham/gists{/gist_id}","starred_url":"https://api.github.com/users/stevegraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevegraham/subscriptions","organizations_url":"https://api.github.com/users/stevegraham/orgs","repos_url":"https://api.github.com/users/stevegraham/repos","events_url":"https://api.github.com/users/stevegraham/events{/privacy}","received_events_url":"https://api.github.com/users/stevegraham/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-10T21:43:37Z","updated_at":"2015-08-15T19:43:23Z","closed_at":"2015-08-15T19:43:22Z","pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1113","html_url":"https://github.com/phoenixframework/phoenix/pull/1113","diff_url":"https://github.com/phoenixframework/phoenix/pull/1113.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/1113.patch"},"body":"This is a PR to discuss Phoenix routing helpers using request data to determine URLs instead of the `Endpoint`. A use case for this is multi-tenant apps.\r\n\r\nOne test is broken, the ScriptName one, because I'm not sure which should take precedence, i.e. the script or the connection?\r\n\r\nThis is my first PR to an OSS Elixir project so please feel free to comment on anything from the general idea to the implementation. I would find it most helpful."},"comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments/131437011","html_url":"https://github.com/phoenixframework/phoenix/pull/1113#issuecomment-131437011","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1113","id":131437011,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","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},"created_at":"2015-08-15T19:43:22Z","updated_at":"2015-08-15T19:43:22Z","body":"@stevegraham I would rather try to provide a pluggable system for this. So you can generate the URL from the connection when you want. Otherwise we end-up falling in the same trap as Rails where the URL generation based on the connection has TONS of options because it needs to handle subdomains, default prefixes and what not. Maybe we could call the router whenever there is a connection and by default it would call the endpoint. If you have that then you would be able to do whatever you want... but I think our default, at least for now, is sane. Thanks!"}}