{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/27785","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/27785/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/27785/comments","events_url":"https://api.github.com/repos/rails/rails/issues/27785/events","html_url":"https://github.com/rails/rails/issues/27785","id":202707486,"number":27785,"title":"*_path helpers ignore `default_url_options`","user":{"login":"arrtchiu","id":648293,"avatar_url":"https://avatars.githubusercontent.com/u/648293?v=3","gravatar_id":"","url":"https://api.github.com/users/arrtchiu","html_url":"https://github.com/arrtchiu","followers_url":"https://api.github.com/users/arrtchiu/followers","following_url":"https://api.github.com/users/arrtchiu/following{/other_user}","gists_url":"https://api.github.com/users/arrtchiu/gists{/gist_id}","starred_url":"https://api.github.com/users/arrtchiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrtchiu/subscriptions","organizations_url":"https://api.github.com/users/arrtchiu/orgs","repos_url":"https://api.github.com/users/arrtchiu/repos","events_url":"https://api.github.com/users/arrtchiu/events{/privacy}","received_events_url":"https://api.github.com/users/arrtchiu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-24T02:21:04Z","updated_at":"2017-01-27T06:28:07Z","closed_at":null,"body":"### Steps to reproduce\r\n\r\n```ruby\r\n# config/routes.rb\r\nscope '(:paramame)', paramname: /my_regex/, defaults: { paramname: nil } do\r\n  get '/foo', as: :foo\r\nend\r\n\r\n# app/controllers/pages_controller.rb\r\ndef default_url_options\r\n  if session[:foo] == 'bar'\r\n    { paramname: 'paramvalue' }\r\n  else\r\n    {}\r\n  end\r\nend\r\n\r\n# view (haml)\r\n= foo_path\r\n```\r\n\r\n### Expected behavior\r\nView outputs `/paramvalue/foo` when `session[:foo] == 'bar'`\r\n\r\n### Actual behavior\r\nView outputs '/foo'\r\n\r\n### System configuration\r\n**Rails version**: 4.2.7.1  \r\n**Ruby version**: 2.2.2\r\n\r\n### Further notes\r\nModifying `config/routes.rb` to remove `defaults` works:\r\n\r\n```ruby\r\n# config/routes.rb\r\nscope '(:paramame)', paramname: /my_regex/ do\r\n  get '/foo', as: :foo\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/275598130","html_url":"https://github.com/rails/rails/issues/27785#issuecomment-275598130","issue_url":"https://api.github.com/repos/rails/rails/issues/27785","id":275598130,"user":{"login":"pixeltrix","id":6321,"avatar_url":"https://avatars.githubusercontent.com/u/6321?v=3","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T06:28:07Z","updated_at":"2017-01-27T06:28:07Z","body":"@arrtchiu does your problem go away if you do `foo_path({})` ?"}}
{"actor":{"display_login":"pixeltrix"}}