Skip to content
Browse files

Mention required glob param name in match docs for mapper

THe match documentation doesn't mention any requirement of the
parameter name requirement for matches. However, including a
bare glob character without a variable assignment causes a
parse error.
  • Loading branch information...
1 parent 6c82107 commit 9632919b0ca6423ae46fbb1c079ccdeb8353ecab @estsauver estsauver committed Mar 20, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
4 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -357,6 +357,10 @@ def root(options = {})
# # params[:category] = 'rock/classic'
# # params[:title] = 'stairway-to-heaven'
#
+ # To match a wildcard parameter, it must have a name assigned to it.
+ # Without a variable name to attach the glob parameter to, the route
+ # can't be parsed.
+ #
# When a pattern points to an internal route, the route's +:action+ and
# +:controller+ should be set in options or hash shorthand. Examples:
#

0 comments on commit 9632919

Please sign in to comment.
Something went wrong with that request. Please try again.