This project is archived and is in readonly mode.
map.resource nested paths don't always resolve properly
-
Peter Wagenet
Though this may be a bug, convention has it that you shouldn't use spaces in your urls. Consider using "slugs" such as "joe_m_black" instead of "joe m. black" it will make for nicer looking urls and won't annoy Rails.
-
Irene
I agree with you that perhaps an id of joe_m_black would work better but we opted to use usernames instead of ids for friendlier URLs (I should have specified that by calling id something else, my apologies) and if someone chose to be identified as Joe M. Black, we support that.
-
Pratik
- Assigned user set to Pratik
- State changed from new to invalid
Looks like your regexp is wrong.
.
Thanks!
-
Pratik
You need to escape the dot ( . )
-
Artem Ignatiev
Just jumped into the same problem.
Regexp is correct,
.'' has no special meaning in character class (inside square brackets).Looks like route recognizer with optimizations * works fine when the segment with the dot is the last one segment * dislikes strings like 'some.thing/another_thing' (can't really understand what happens inside to_plain_segments * works fine if the dot in the URL is escaped like @%3E@
The problem is that generated helper methods (like
user_messages_pathin the original example) will not escape the dot by itself, and if you want to escape it usingto_parammethod, it will escape percent sign, so your%2Ewill become%252E -
Artem Ignatiev
(Whoops, formatting is wrong)
Just jumped into the same problem.
Regexp is correct, “@.@” has no special meaning in character class (inside square brackets).
Looks like route recognizer with optimizations * works fine when the segment with the dot is the last one segment
-
dislikes strings like 'some.thing/another_thing' (can't really understand what happens inside to_plain_segments
-
works fine if the dot in the URL is escaped like @%3E@
The problem is that generated helper methods (like
user_messages_pathin the original example) will not escape the dot by itself, and if you want to escape it usingto_parammethod, it will escape percent sign, so your “@some%2Ething@” will become “@some%252Ething@” -