{"comment":{"created_at":"2011-10-12T05:44:59Z","body":"Also, important to note is that while using constraints, only `url_for` does not work, while named routes translate perfectly and use the constraints. So, the constraints options are not lost, but somehow, they prevent translated routes from being created properly. \r\n\r\nPlease provide some assistance in finding this bug, I'll be happy to create tests and patches for you to pull once I know where to fix it. I don't have too much experience with Rails's internals, so I probably won't find it on my own.\r\n\r\nThanks!","updated_at":"2011-10-12T05:44:59Z","url":"https://api.github.com/repos/kwi/i18n_routing/issues/comments/2376001","id":2376001,"user":{"avatar_url":"https://secure.gravatar.com/avatar/0b3da810e976e4328294cf9a41b39639?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jensb","id":44540,"login":"jensb"}},"action":"created","issue":{"number":27,"created_at":"2011-10-09T18:04:06Z","pull_request":{"diff_url":"https://github.com/kwi/i18n_routing/pull/27.diff","patch_url":"https://github.com/kwi/i18n_routing/pull/27.patch","html_url":"https://github.com/kwi/i18n_routing/pull/27"},"body":"Hello,\r\n\r\nwhen using named_route paths with multiple parameters, translations are not detected (so paths are not translated). Attached is a patch which adds four failing tests, to test this.\r\n\r\nFailures:\r\n\r\n    1) localized_routes routes in loop and controller blocks translated named route, from\r\n     Failure/Error: routes.send(:from_search_path, :country => 'DE', :city => 'HH', :type => 'from').should == '/von/DE/HH'\r\n       expected: \"/von/DE/HH\"\r\n            got: \"/from/DE/HH\" (using ==)\r\n     # ./spec/i18n_routing/i18n_spec.rb:259\r\n\r\n    2) localized_routes routes in loop and controller blocks translated named route, to\r\n     Failure/Error: routes.send(:to_search_path, :country => 'DE', :city => 'HH', :type => 'to').should == '/nach/DE/HH'\r\n       expected: \"/nach/DE/HH\"\r\n            got: \"/to/DE/HH\" (using ==)\r\n     # ./spec/i18n_routing/i18n_spec.rb:262\r\n\r\n    3) localized_routes routes in loop and controller blocks translated url_for, from\r\n     Failure/Error: url_for(:controller => :search, :action => :show, :country => 'DE', :city => 'HH', :type => 'from').should == '/von/DE/HH'\r\n       expected: \"/von/DE/HH\"\r\n            got: \"/from/DE/HH\" (using ==)\r\n     # ./spec/i18n_routing/i18n_spec.rb:265\r\n\r\n    4) localized_routes routes in loop and controller blocks translated url_for, to\r\n     Failure/Error: url_for(:controller => :search, :action => :show, :country => 'DE', :city => 'HH', :type => 'to').should == '/nach/DE/HH'\r\n       expected: \"/nach/DE/HH\"\r\n            got: \"/to/DE/HH\" (using ==)\r\n     # ./spec/i18n_routing/i18n_spec.rb:268\r\n","comments":3,"title":"Added some failing tests with named_route and url_for: why do these fail?","updated_at":"2011-10-12T05:44:59Z","url":"https://api.github.com/repos/kwi/i18n_routing/issues/27","id":1857257,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/0b3da810e976e4328294cf9a41b39639?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jensb","id":44540,"login":"jensb"},"html_url":"https://github.com/kwi/i18n_routing/issues/27","labels":[],"state":"open"},"legacy":{"issue_id":1857257,"comment_id":2376001}}