# Period as separator in Edge Rails routes

**URL:** <https://www.ruby-forum.com/t/period-as-separator-in-edge-rails-routes/72339>\
**Category:** Rails\
**Created:** [October 16, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/period-as-separator-in-edge-rails-routes/72339 "2006-10-16T17:16:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [October 16, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/period-as-separator-in-edge-rails-routes/72339/1 "2006-10-16T17:16:20Z")

</div>

We have an application where one part of many routes is a user name.  
This user name may contain one or more periods, like so:

```
http://domain.name/typical.user/messages

```

This of course works nicely in Rails 1.1. But in Edge Rails, the  
period is a routing character signifying the choosing of data  
representations.

Is there a way of turning off this behaviour? We do not want to have  
to URL-encode our usernames.

```
/ Peter B.
```

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [October 16, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/period-as-separator-in-edge-rails-routes/72339/2 "2006-10-16T20:31:45Z")

</div>

On 16 okt 2006, at 17.11, Peter B. wrote:

> Is there a way of turning off this behaviour? We do not want to have  
> to URL-encode our usernames.

The more I look into this, the more it looks like a Rails bug. In a  
route such as the following:

```
map.connect '/foo/:login/bar/baz', :controller => 'whatever'

```

why should matching fail at all when the value for :login contains a  
period? Only if the route was written:

```
map.connect '/foo/:login.:format/bar/baz, ...

```

would it be any point in parsing for a period as a separator.  
Moreover, is there really any point in interpreting a period in input  
data unless the data comes _last_ in the URL?

```
/ Peter B.
```

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [October 17, 2006, 11:44am UTC](https://www.ruby-forum.com/t/period-as-separator-in-edge-rails-routes/72339/3 "2006-10-17T11:44:18Z")

</div>

Doesn’t anybody have any clue about this???
