abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Ancona <...@anconafamily.com>
Subject Route matching too liberal?
Date Fri, 08 Feb 2008 03:33:29 GMT
I have run into some problems with my Routes matching unexpectedly. 
Before filing a bug, I thought I'd ask for feedback on whether the 
current behavior is correct.

The current algorithm attempts to match the non-variable parts of the 
pattern, setting the variable to whatever is in between.

So the pattern "/base/:collection/" matches both "/base/test/" and 
"/base/test/123/". In the second case, the value of the collection 
variable is "test/123". In my opinion, not allowing matches to span URI 
segments would be less prone to unintuitive results.

FWIW, a quick glance at some docs on Ruby Routes seems to indicate that 
they do not span URI path segments.

Thoughts?

Jim

Mime
View raw message