Closed pixeltrix closed 7 years ago
Looks like I accidentally fixed this issue in PR #44. Would you mind looking over that one and giving me some feedback?
I can add a test for this regression as well if you would like:
route_name = "foobar"
add_routes @router, [
Router::Strexp.new("/foo/:id", { :id => /\d+/ }, ['/', '.', '?'], false)
], :name => route_name
assert_raises(Journey::Router::RoutingError) do
@formatter.generate(:path_info, route_name, {}, {})
end
Were you able to take a look at #44? Did you have any problems, questions or issues with the proposed code change?
If #44 cannot be implemented for a technical or scope reason, this change looks good to me. Otherwise, we should close this issue out.
Closing because it's fixed 😄
Although 70d101b3386ba26ff801cec496da9c23389434aa fixes the generation of URLs when passed nil required params it still works with empty strings, e.g:
Rack::Mount raises an error in the same situation, so is a regression from Rails 3.1 to Rails 3.2. This can be fixed by changing
verified_required_parts!
to:If this is acceptable I can push the fix and tests (I'll also add an integration test in Rails). I have write access to the repository but I thought I'd run it past you first out of courtesy. :smile: