Error message for optimized url helper is different from the normal helper #13592

Closed
pixeltrix opened this Issue Jan 4, 2014 · 0 comments

Comments

Projects
None yet
1 participant
Owner

pixeltrix commented Jan 4, 2014

When generating a path using the optimized helper the error message doesn't show the controller and action from the route making it harder to diagnose the problem, e.g:

>> app.post_path(nil)
ActionController::UrlGenerationError: No route matches {:id=>nil} missing required keys: [:id]

versus:

>> app.post_path(:id => nil)
ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"posts", :id=>nil} missing required keys: [:id]

pixeltrix was assigned Jan 4, 2014

@pixeltrix pixeltrix added a commit that referenced this issue Jan 5, 2014

@pixeltrix pixeltrix Show full route constraints in error message
When an optimized helper fails to generate, show the full route constraints
in the error message. Previously it would only show the contraints that were
required as part of the path.

Fixes #13592
2df304c

pixeltrix closed this in 892c539 Jan 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment